ByteScout Spreadsheet SDK - C# - Export To 2D Array - ByteScout

ByteScout Spreadsheet SDK – C# – Export To 2D Array

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Export To 2D Array

How to export to 2d array in C# and ByteScout Spreadsheet SDK

The tutorial shows how to export to 2d array in C#

Sample source code below will show you how to cope with a difficult task like export to 2d array in C#. Want to export to 2d array in your C# app? ByteScout Spreadsheet SDK is designed for it. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams.

This code snippet below for ByteScout Spreadsheet SDK works best when you need to quickly export to 2d array in your C# application. Just copy and paste the code into your C# application’s code and follow the instruction. Code testing will allow the function to be tested and work properly with your data.

You can download free trial version of ByteScout Spreadsheet SDK from our website to see and try many others source code samples for C#.

Try ByteScout Spreadsheet SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; namespace Bytescout.Spreadsheet.Demo.Csharp.ExportTo2DArray { class Program { static void Main(string[] args) { const string inputFile = @"StockPricesSpreadsheet.xls"; // Open and load spreadsheet Spreadsheet spreadsheet = new Spreadsheet(); spreadsheet.LoadFromFile(inputFile); // Get the data from the spreadsheet string[,] stockPrices = spreadsheet.ExportTo2DArray(); // Close spreadsheet spreadsheet.Close(); // Display data in data table for(int i = 0; i < stockPrices.GetLength(0); i++) { for(int j = 0; j < stockPrices.GetLength(1); j++) { Console.Write(stockPrices[i,j] + " "); } Console.WriteLine(); } // Pause Console.ReadLine(); } } }

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

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK page

Explore ByteScout Spreadsheet SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next