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. Image for the cookie policy date

Exporting dataset to excel file

Hello i am looking for a way to directly export a dataset or a table to an excel file.
I would really appreciate if anybody could tell me how i can export data of xml file to excel file directly.

Thank you


4 Replies

MW Melba Winshia Syncfusion Team February 9, 2007 09:43 AM UTC

Hi Nipun,

Thanks for your interest in Syncfusion Essential XlsIO.

1)You can directly export a dataset or a table to an excel file by using ImportDataTable method. Here is the sample for your reference:

XlsIODataSet.zip

2) Please refer the following sample to export data of xml file to excel file directly.

XML.zip

Please take a look at the sample above and let me know if you have any other questions.

Regards,
Melba



NT Nipun Tamrakar February 9, 2007 11:42 AM UTC

Thanks a lot Melba
Thats exactly what i was looking for.

Thank you
Nipun


MW Melba Winshia Syncfusion Team February 10, 2007 10:04 AM UTC

Hi Nipun,

Thanks for the update.

Glad to know that it helps you!

Please let me know if you have any other queries.

Regards,
Melba



SR Sridhar Syncfusion Team February 2, 2012 04:36 PM UTC

Hi Gontrand,

Thank you for using syncfusion products.

Please go through the online sample link for exporting the data table to an excel file by using ImportDataTable method.

http://asp.syncfusion.com/sfaspnetsamplebrowser/10.1.0.44/Web/XlsIO.Web/samples/4.0/Data%20Binding/ImportExportDataTable/CS/ImportExportDataTable.aspx

Please go through the following code snippet for exporting the XML data to an excel file by using ImportDataTable method.

Code Snippet [C#]:

private DataTable northwindDt;

//Load Data
DataSet customersDataSet = new DataSet();
customersDataSet.ReadXml(ResolveApplicationDataPath("customers.xml"), XmlReadMode.ReadSchema);
northwindDt = customersDataSet.Tables[0];

//Import method
sheet.ImportDataTable(northwindDt, true, 3, 1, -1, -1);

Please try know the above code snippet at your side and let us know if this helps you.

Please let us know if you require any further clarifications.

Regards,
Sridhar.S


Loader.
Live Chat Icon For mobile
Up arrow icon