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.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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; } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: