I am using the following "output to" line but when I try to open the resulting spreadsheet it gives an "incorrect file format" error although it clearly displays it as an Excel.xlsx file.
Using Access 2010 / Excel 2010
I then tried the old format (which works) but that opens the spreadsheet in Compatibility mode rather than full 2010.
Are there better ways of doing this?
Thanks
Using Access 2010 / Excel 2010
Code:
DoCmd.OutputTo acTable, "tblData", acFormatXLS, "s:\Data".xlsx", , ""
I then tried the old format (which works) but that opens the spreadsheet in Compatibility mode rather than full 2010.
Code:
DoCmd.OutputTo acTable, "tblData", "MicrosoftExcel(*.xls)", "s:\Data".xls", , ""
Are there better ways of doing this?
Thanks