Export data to Excel Column

J

Justin

Currently I export data to excel using the sql statment:

SELECTTable1.Field1 INTO [Excel 8.0;HDR=Yes;DATABASE=C:\File.xls].Sheet1
FROM Table1 WHERE (((Table1.Field2)=2));
DoCmd.RunSQL

I run the sql statement multiple times, changing the "Sheet1" data to create
new sheets in the same exel file.

Is there a way to export to the same excel file, same sheet, different column?
For example IO want to run the sql statment and populate columnA, run it a
second time and populate columnB, etc..

Any assistance will be appreciated.
 
P

pietlinden

Currently I export data to excel  using the sql statment:

SELECTTable1.Field1 INTO [Excel 8.0;HDR=Yes;DATABASE=C:\File.xls].Sheet1
FROM Table1 WHERE (((Table1.Field2)=2));
DoCmd.RunSQL

I run the sql statement multiple times, changing the "Sheet1" data to create
new sheets in the same exel file.  

Is there a way to export to the same excel file, same sheet, different column?
For example IO want to run the sql statment and populate columnA, run it a
second time and populate columnB, etc..

Any assistance will be appreciated.

read this article:
http://www.mvps.org/access/modules/mdl0035.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top