Printable View
hi all I have a vb program. i need to export the data from vb to excel. can u help me with the code. how to create a excel file. save the excel file and write data into it. the data written into the excel file exceeds 65000 rows. how can i handle that.
You can use 'output' to save data to a file as .CSV also, you'd have to use more than one file to get over the 65000 problem.
so... Code: open filename.csv for output as #1 print #1, data (data being the variable) If the file doesn't exist, it SHOULD create it.
open filename.csv for output as #1 print #1, data (data being the variable)
See the following article: INFO: Methods for Transferring Data to Excel from Visual Basic Keep in mind that transferring this much data using automation (cell by cell) can be extremely slow. Copying it from a Recordset (CopyFromRecordset) or directly from another data source using SQL is much more efficient.