We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to export data from excel sheet to a datatable?

Platform: WinForms |
Control: XlsIO |
Published Date: April 30, 2011 |
Last Revised Date: July 18, 2014

The IWorksheet.ExportDataTable method is used to export data from excel sheet to DataTable. Please refer the below code snippet which illustrates this:

C#

VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
lethalmarc
Oct 20, 2014
You can use OLEDB ... MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:\\csharp.net-informations.xls';Extended Properties=Excel 8.0;"); MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection); MyCommand.TableMappings.Add("Table", "TestTable"); DtSet = new System.Data.DataSet(); MyCommand.Fill(DtSet); Source : http://csharp.net-informations.com/excel/csharp-excel-oledb.htm Lethal Reply
Divya
Nov 27, 2016

Iam unable to find methods other than importdata that can be used to add data to worksheet. Import data table is not available. I have added reference to syncdusion.xlsio in my xamarin Android project. Am i missing any other reference?

Reply
Johnson Monohar M [Syncfusion]
Nov 06, 2017

Hi Divya,

Import from DataTable is not supported in Xamarin platform.

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon