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.

Thu May 09, 2013 3:09 pm

Hi,

I encounter an error when using this code - CellExport1.SaveToFile().

Error Message -
WorkSheet parts with error: Data source (Command) property has not been initialized.. TextExport::SaveToFile,var:

In my form, I have two buttons and one datagrid.

The first button is for loading of data to datagrid, this works fine.
The second button is for exporting to excel, my code is below:
myconnection.Open()
Try
CellExport1.SaveToFile()
Finally
myconnection.Close()
End Try

chydfaye
 
Posts: 3
Joined: Thu May 09, 2013 6:16 am

Fri May 10, 2013 3:29 am

Hello chydfaye,

Thanks for your inquiry.

Please download the DataExport Demo and refer to it, which link is http://www.e-iceblue.com/Knowledgebase/Spire.DataExport/Program-Guide.html. If there are still issues, could you please provide us your complete code? That we could work out the solution for you.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon May 13, 2013 9:41 am

Hi,

Has the issue been resolved? Could you please update the thread if convenience.

If there are any questions, welcome to get it back to us.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.DataExport