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?

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

Article ID: Published Date: Last Revised Date: Platform: Control:
1927 04/30/2011 07/18/2014 WinForms XlsIO
Tags:
Did you find this information helpful?
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.

Add Comment
You must log in to leave a comment

Please sign in to access our KB

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

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