gazsharpe101
Registered User.
- Local time
- Today, 22:02
- Joined
- Oct 23, 2007
- Messages
- 47
Hi,
I have got a report that I want to export to a spreadsheet and I am currently using the following code to do so:
DoCmd.OutputTo acOutputReport, "reportname", acFormatXLS
However, in the report header there are two text boxes, one underneath the other, but when I export it to excel it puts them next to each other and makes the column widths really big.
Is the DoCmd.TransferSpreadsheet better and if so how do I go about using it? I am currently using the following code:
DoCmd.TransferSpreadsheet (acExport, acSpreadsheetTypeExcel8, "rptTenonWULSInformation", "C:\TenonWULS.xls",True)
But when I try and run it, I get an error message saying:
Compile Error:
Expected: =
I cannot understand what I need to put.
I would prefer if possible to have a template document and choose the specific cells in which the date is imported is there a way to do this?
Thanks for your help.
Gareth.
I have got a report that I want to export to a spreadsheet and I am currently using the following code to do so:
DoCmd.OutputTo acOutputReport, "reportname", acFormatXLS
However, in the report header there are two text boxes, one underneath the other, but when I export it to excel it puts them next to each other and makes the column widths really big.
Is the DoCmd.TransferSpreadsheet better and if so how do I go about using it? I am currently using the following code:
DoCmd.TransferSpreadsheet (acExport, acSpreadsheetTypeExcel8, "rptTenonWULSInformation", "C:\TenonWULS.xls",True)
But when I try and run it, I get an error message saying:
Compile Error:
Expected: =
I cannot understand what I need to put.
I would prefer if possible to have a template document and choose the specific cells in which the date is imported is there a way to do this?
Thanks for your help.
Gareth.