Syntax of export ACCESS TABLE to EXCEL in Specific Cells

rickyfong

Registered User.
Local time
Yesterday, 17:10
Joined
Nov 25, 2010
Messages
199
For instance, first table export to EXCEL CELL A1 and then second table export to the same EXCEL but to CELL A5! I simply do not know the sytax to tell ACCESS to do the correct export!

e.g. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EXPORTDATA", "c:\EXCELSHEET.xls", True
 
How many fields does your table have and do you know how many records?
All you have to do is add the range argument i.e. a table with 10 records and four fields would be
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EXPORTDATA", "c:\EXCELSHEET.xls", True, "A1:D10"

David
 
that should read
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EXPORTDATA", "c:\EXCELSHEET.xls", True, "A1:D10"
David
 

Users who are viewing this thread

Back
Top Bottom