aziz rasul
Active member
- Local time
- Today, 09:49
- Joined
- Jun 26, 2000
- Messages
- 1,935
Why does the following code work for .XLS files but not for .XLSX files?
If I use acSpreadsheetTypeExcel12 the problem persists. When I open the .XLSX file I get the error
Excel cannot open the file "Report.xlsx" because the file format or extension is not valid. Verify that the file has not been corrupted and ...
I'm using Access 2010.
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, strQueryName, Me.txtOutputPath & strReportName & ".XLSX"
If I use acSpreadsheetTypeExcel12 the problem persists. When I open the .XLSX file I get the error
Excel cannot open the file "Report.xlsx" because the file format or extension is not valid. Verify that the file has not been corrupted and ...
I'm using Access 2010.