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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append access file to Excel spreadsheet

Status
Not open for further replies.

TracySHC

MIS
May 5, 2005
66
US
I'm currently processing data in Access, and would like to append the Access data file to an existing Excel spreadsheet (and not overlay the existing Excel spreadsheet). Is there a way in Access Visual Basic to accomplish this?
Thank you for any and all help and advice,
Tracy
 
If you want to export a table or a query to an existing Excel file execute the

DoCmd.TransferSpreadSheet method

and for the filename use your existing excel file name. If the name of exported table or query already exists in the excel file, then a new one is to be added to the excel with the name followed by the number '1'.

Search for help within MS-Access
 
With OLE Automation you may from within Access VBA open the spreadsheet (GetObject function) and play with the 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 FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top