ByteScout Spreadsheet SDK - C# - Export To 2D Array - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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#.

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

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