how I can directly to export the content of a DataGrid from the VB project in an Excel file ?
Printable View
how I can directly to export the content of a DataGrid from the VB project in an Excel file ?
Here is some code from eimroda....
Code:Open "TestFile.xls" For output As #1
For i=0 to Grid.Rows-1
print #1, Grid.TextMatrix(i, 0) & vbTab & Grid.TextMatrix(i,1) 'and so on
Next i
Close #1
ther is an error. It does not recognize the property of the object Grid.TextMatrix (TextMatrix it is not in the list of property)...)
Grid is the name of your DataGrid....
yes