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

Exporting two tables to seperate sheets in excel

Status
Not open for further replies.

biscuitboy

Technical User
Dec 11, 2004
22
0
0
GB
Hi,

I would like to be able to export two tables, one called "Data" and one called "Monthdetails". I would like them to be exported into a new workbook in excel with "Data" being on sheet1 and "Monthdetails" on sheet2.

Is this possible, can anyone help.

Best regards
 
Export from WHERE!!!

Access, SQL Server Oracle, text file?

More details please.

Regardless of the above it may be easier for you to import into excel instead.

Either way you should be able to search these forums for ADO and recordset and excel and you will find a few examples of what you need.

Once you have tried it show us some code and will will try and help.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Hiya Sorry about that.

Im working in Access and trying to export them into excel. However I want excel to open onto an unsaved workbook and then the tables to be inserted onto the sheets.

I have tried the output method however it requires a file name for the excel sheet to be saved under which at this point I dont want to define.

Regards
 
Have a look at DAO / ADO in the help files then - you can load your table / query into a recordset and then use VBA to create an instance of excel with a blank workbook and just dump the data in using the COPYFROMRECORDSET method in VBA

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top