How do I script to export a table to excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to know how to write a procedure to export a Access table to
excel.
 
Take a look at the following method: DoCmd.TransferSpreadsheet

Following example copies the table to a spreadsheet:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"qryName", strFileName, True

where "qryName" is a string corresponding to a query that bounds the scope
and order of the data to be transferred, and strFileName is a sting
containing the complete path and name of the Excel file to be saved.
 

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

Back
Top