ByteScout Spreadsheet SDK - C# - Export To Dataset - ByteScout

ByteScout Spreadsheet SDK – C# – Export To Dataset

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Export To Dataset

How to export to dataset in C# with ByteScout Spreadsheet SDK

This tutorial will show how to export to dataset in C#

The sample source codes on this page shows how to export to dataset in C#. ByteScout Spreadsheet SDK is the SDK that can write and read, modify and calculate Excel and CSV spreadsheets. Most popular formulas are supported. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays. It can export to dataset in C#.

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 export to dataset below and use it in your application. In your C# project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample C# codes.

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; using System.Data; namespace Bytescout.Spreadsheet.Demo.Csharp.ExportToDataSet { class Program { static void Main(string[] args) { const string inputFile = @"PeriodicTableOfElementsSpreadsheet.xls"; // Open and load spreadsheet Spreadsheet spreadsheet = new Spreadsheet(); spreadsheet.LoadFromFile(inputFile); // Get the data from the spreadsheet DataSet dataSet = spreadsheet.ExportToDataSet(); // Close spreadsheet spreadsheet.Close(); // Display data in the first data table in the dataset DataTable dt = dataSet.Tables[0]; Console.WriteLine("Displaying contents of first datatable"); for (int i = 0; i < dt.Rows.Count; i++) { for (int j = 0; j < dt.Columns.Count; j++) { Console.Write(dt.Rows[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