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

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

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

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