ByteScout Spreadsheet SDK - C# - Read XML Spreadsheet (SpreadsheetML format) - ByteScout

ByteScout Spreadsheet SDK – C# – Read XML Spreadsheet (SpreadsheetML format)

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Read XML Spreadsheet (SpreadsheetML format)

How to read XML spreadsheet (spreadsheetml format) in C# and ByteScout Spreadsheet SDK

How to code in C# to read XML spreadsheet (spreadsheetml format) with this step-by-step tutorial

Every ByteScout tool contains example C# source codes that you can find here or in the folder with installed ByteScout product. What is ByteScout Spreadsheet SDK? It is the SDK to create, read, modify and calculate spreadsheets. Formula calculations are supported, import and export to and from JSON, CSV, XML, databases, arrays. It can help you to read XML spreadsheet (spreadsheetml format) in your C# application.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Spreadsheet SDK for read XML spreadsheet (spreadsheetml format) below and use it in your application. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

ByteScout Spreadsheet SDK free trial version is available on our website. C# and other programming languages are supported.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using Bytescout.Spreadsheet; using System; namespace ReadSpreadsheetMLFormat { class Program { static void Main(string[] args) { try { //Convert SpreadhseetML (xml spreadsheet) to XLSX format using (var spreadsheet = new Spreadsheet()) { spreadsheet.RegistrationName = "demo"; spreadsheet.RegistrationKey = "demo"; // Load input file spreadsheet.LoadFromFile("sample.xml"); // Generate XLSX format spreadsheet.SaveAsXLSX("sample.xlsx"); } // Read spreadsheet and display data to console using (var spreadsheet = new Spreadsheet()) { spreadsheet.RegistrationName = "demo"; spreadsheet.RegistrationKey = "demo"; // Load input file spreadsheet.LoadFromFile("sample.xlsx"); //Reference Worksheet Worksheet worksheet = spreadsheet.Worksheets[0]; Console.WriteLine("====================================================="); Console.WriteLine("================ Spreadsheet data ==================="); Console.WriteLine("====================================================="); // Read and output cells to console. for (int row = worksheet.UsedRangeRowMin; row <= worksheet.UsedRangeRowMax; row++) { for (int column = worksheet.UsedRangeColumnMin; column <= worksheet.UsedRangeColumnMax; column++) { Console.Write("{0}\t", worksheet.Cell(row, column).ValueAsString); } Console.WriteLine(); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine("Press any key to exit..."); Console.ReadLine(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next