Hi everyone,
I need to know how one goes about opening Excell, writing data to an Excell sheet, and saving it.
Your help is much appreciated... Thank You!
Printable View
Hi everyone,
I need to know how one goes about opening Excell, writing data to an Excell sheet, and saving it.
Your help is much appreciated... Thank You!
If you dont need any special formatting just write the recordset to a comma delimited file and save it as file.csv. This will reduce the overhead of having to use the excel object model.
Just make sure that if any of the data is character make sure you put [""] around it.
The output file would look like:
col1, col2, "col3"
etc...
Kev.-
Not sure what is the implementation of your program. Another way of retrieving data from DB into Excel is to use the QUERY tool in Excel.
In Excel 2000: Data->Get External Data->New Query which will allow you to query your DB directly from Excel and display the contents.
Otherwise, comma-delimited file is the easiest way to go.
-Cool Bizs
Thanks guys, your tips really helped.