chestera
asked on
Spread headings
Hi EE
I generate a spread sheet using the following
FileName = "SmartCashFinancialReport. xls"
Tpath = "C:\SmartCash\AnnualReport \" & FileName
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tblFinancialReport", Tpath
Is it possibe to add a heading. Any help appreciated
chestera
I generate a spread sheet using the following
FileName = "SmartCashFinancialReport.
Tpath = "C:\SmartCash\AnnualReport
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tblFinancialReport", Tpath
Is it possibe to add a heading. Any help appreciated
chestera
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If by heading you mean column headings, the answer is yes; that is an option in the TransferSpreadsheet method.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
boag2000
Hi Jeff
The spread would look like this
Financial Report
Col1 Col2 Col3 Col4
At the moment I only have the data
Alan
Hi Jeff
The spread would look like this
Financial Report
Col1 Col2 Col3 Col4
At the moment I only have the data
Alan
ASKER
Scott McDaniel
Would that ocmo out like
Heading Col1 Col2 Col3 etc
Alan
Would that ocmo out like
Heading Col1 Col2 Col3 etc
Alan
Lets see what Scott posts on his suggestion...
Doing what you are asking above would require vba automation as the first expert suggests.
Doing what you are asking above would require vba automation as the first expert suggests.
ASKER
boag2000
I was just going to test, I have just created a blank spreadsheet with a heading
I was just going to test, I have just created a blank spreadsheet with a heading
ASKER
boag2000
I now generate the spreadsheet then it opens and the user can enter a header if required
Alan
I now generate the spreadsheet then it opens and the user can enter a header if required
Alan
ASKER
Scott McDaniel
I tried your suggestion but it's not quite what's need. I get the following
Col1 Col2 Col3,,,,,,, Heading
I need
Heading
Col1 Col2 Col3 etc
I now generate the spreadsheet then auto opens so the user can enter a heading if required.
The reason for the question I thought there might be some way to incorporate into the DoCmd.Transfer command
Alan
I tried your suggestion but it's not quite what's need. I get the following
Col1 Col2 Col3,,,,,,, Heading
I need
Heading
Col1 Col2 Col3 etc
I now generate the spreadsheet then auto opens so the user can enter a heading if required.
The reason for the question I thought there might be some way to incorporate into the DoCmd.Transfer command
Alan
I needThat's what I imagined. For this, automation is the only method with the latest and current versions of Microsoft Office.
Heading
Col1 Col2 Col3 etc
/gustav
You could union the header with the query you are exporting now and export the union query. That will get the header on the first line but it will be squished into the first column. There is no way without automation to center it, etc.
An alternative might be to control the name that appears on the tab. Excel picks up the name of your query so you could change the query name to be more descriptive.
An alternative might be to control the name that appears on the tab. Excel picks up the name of your query so you could change the query name to be more descriptive.
ASKER
PartHartman
Thank you Pat. The user can enter a heading of their choice from the generated spreadsheet
Alan
Thank you Pat. The user can enter a heading of their choice from the generated spreadsheet
Alan
ASKER
Thank you for your help
/gustav