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.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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(); } } }

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next