Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset to Export to CSV ?

Status
Not open for further replies.

solo7

Technical User
Mar 14, 2001
243
NO
I have an ADODB Recordset which I want to export to a CSV file. However i need to play around with some of the fields before export, ie change the Name field to 2 fields consisting of First Name and Surname - So John Doe in my DataBase will be 2 columns in an excel CSV file.

My theory is to populate a recordset (done), and then create a Temp table (done - making sure any existing Temp table is deleted). Then to write record by record to the Temp table the recordset records, and finally exporting the table. How can I write a recordset record to a specific table whilst filtering the records content?

solo7[thumbsup2]
 
You may also consider automating Excel with OLE, playing with CopyFromRecordset method of the Excel.Range object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top