Export recordset or table to existing .csv file

Graham63

Registered User.
Local time
Today, 10:59
Joined
Mar 22, 2012
Messages
20
Hi Guys

I am not an expert and I need help to export an access "test" table or perhaps the recordset to a generic .csv file that already exists. I am not sure how to approach it but I have had some success exporting dynamically to excel before.

The data has 4 columns that need to start from (A:3) across to (D:3) on a worksheet called "Point Text". and don't need to have a column header. Can you step me through me through a good method to achieve this if it is possible.

The .csv file is quite simple and could be created new if the 1st row at (A:1)could have the string "[Point Text]" inserted and the 2nd row would then need to have column headers.

Thanks in advance for your thoughts!
 
Thanks for the response, though this wasn't the method I found suitable, I thought I would leave a post that described a solution. Ken Snell has produced a great range of vba sub procedures for importing and exporting to excel that are well known I think. Amongst them is this;

Write Data From a Recordset into an EXCEL Worksheet using Automation (VBA)

His code was very useful because I was able to write the recordset directly, starting at a range on an existing worksheet and more importantly because it would write to the .csv file extension, the code just calls to the open workbook.

Great!

Thanks Ken
 

Users who are viewing this thread

Back
Top Bottom