Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Tue Feb 22, 2011 5:29 am

When I fill my data table with the data source of the DataGridView, it appears an error. I give you the code:
worksheet1.DataTable = this.dataGridView.DataSource;

tomason
 
Posts: 11
Joined: Mon Dec 27, 2010 3:08 am

Thu Feb 24, 2011 2:44 am

You don't convert the type. You should use the following code:
worksheet1.DataTable = this.dataGridView.DataSource as DataTable;
e-iceblue support
User avatar

iceblue support
 
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.DataExport