ronallard
asked on
VBA: TransferSpreadsheet output Excel 2007
What can I use in the transferspreadsheet command to get it to write the spreadsheet out as .XLSX type?
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, ....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
matthewspatrick,
Did you mean:
Docmd.TransferSpreadsheet acExport ,acSpreadsheetTypeExcel12, ...
You posted the XML format.
Jeff
Did you mean:
Docmd.TransferSpreadsheet acExport ,acSpreadsheetTypeExcel12,
You posted the XML format.
Jeff
ASKER
I don't know xml? All I posted is a snipit of the code currently in use and since we've upgraded to 2007 I thought I would change the code to create spreadsheet in that version..???? The instruction you gave me works fine.
ronallard,
Just a note.
If you export to the 2007 format, people who do not have Office 2007 will not be able to open the file.
When you type in VBA intellisense should list the "Constraints".
If not, you can right click and select: List Constraints, then they will be listed.
;-)
Jeff
untitled.JPG
Just a note.
If you export to the 2007 format, people who do not have Office 2007 will not be able to open the file.
When you type in VBA intellisense should list the "Constraints".
If not, you can right click and select: List Constraints, then they will be listed.
;-)
Jeff
untitled.JPG
ASKER
Interesting! I have that on, but do not get ...12 or ...12xml in the drop-down????
ASKER
By the way is there a significant difference between those two types?
"I have that on, but do not get ...12 or ...12xml in the drop-down"
I presume it worked, because you accepted a post.
Is this the case?
" is there a significant difference between those two types"
Yes, there is a difference.
The xlsx format is Excel 2007 only, meaning it is an Excel file.
XML is a format is a bit harder to define.
To keep it simple, it is basically a format that allows the file to be read by any program that can accept XML Data, or any of the newer web technologies.
Perhaps matthewspatrick can provide a more detailed definition...
;-)
Jeff
I presume it worked, because you accepted a post.
Is this the case?
" is there a significant difference between those two types"
Yes, there is a difference.
The xlsx format is Excel 2007 only, meaning it is an Excel file.
XML is a format is a bit harder to define.
To keep it simple, it is basically a format that allows the file to be read by any program that can accept XML Data, or any of the newer web technologies.
Perhaps matthewspatrick can provide a more detailed definition...
;-)
Jeff
ASKER
I just changed "acSpreadsheetTypeExcel9" to "acSpreadsheetTypeExcel12x ml" and it created the spreadsheet as .xlsx. I sounds like I should change it to "acSpreadsheetTypeExcel12" if I'm just looking for the 2007 version.
The xlsx file extension is the desinated extensin for Access 2007 formatted Excel files.
Don't take a chance, if you do not explicitly need the XML format, don't use it.
Don't take a chance, if you do not explicitly need the XML format, don't use it.
ASKER