ByteScout Spreadsheet SDK - C# - Import From Jagged Array - ByteScout

ByteScout Spreadsheet SDK – C# – Import From Jagged Array

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Import From Jagged Array

How to import from jagged array in C# using ByteScout Spreadsheet SDK

How to code in C# to import from jagged array with this step-by-step tutorial

Learn how to import from jagged array in C# with this source code sample. ByteScout Spreadsheet SDK can import from jagged array. It can be used from C#. ByteScout Spreadsheet SDK is the library (SDK) that is capable of writing, reading, modifying and calculating Excel and CSV spreadsheets. Most popular formulas can be calculated and reculculated with Excel installed. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays.

This code snippet below for ByteScout Spreadsheet SDK works best when you need to quickly import from jagged array in your C# application. Just copy and paste the code into your C# application’s code and follow the instruction. Use of ByteScout Spreadsheet SDK in C# is also explained in the documentation included along with the product.

Trial version of ByteScout Spreadsheet SDK is available for free. Source code samples are included to help you with your C# app.

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

Program.cs
      
using System.Diagnostics; using System.IO; namespace Bytescout.Spreadsheet.Demo.Csharp.ImportFromJaggedArray { class Program { static void Main(string[] args) { const string fileName = "CSharpImportFromJaggedArray.xls"; // Create a new spreadsheet Spreadsheet spreadsheet = new Spreadsheet(); // Get the data from the jagged array that we want to import string[][] periodicTable = GetJaggedArray(); // Import data into spreadheet spreadsheet.ImportFromJaggedArray(periodicTable); // Save the spreadsheet if (File.Exists(fileName)) File.Delete(fileName); spreadsheet.SaveAs(fileName); // Close spreadsheet spreadsheet.Close(); // Open the spreadsheet Process.Start(fileName); } /// <summary> /// Creates a jagged array of the period table of elements /// </summary> /// <returns>Jagged array of the periodic table of elements</returns> private static string[][] GetJaggedArray() { string[][] periodicTable = { new string[] {"H","He"}, new string[] {"Li","Be","B","C", "N", "O", "F", "Ne"}, new string[] {"Na","Mg","Al","Si", "P", "S", "Cl", "Ar"}, new string[] {"K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr"} }; return periodicTable; } } }

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