I'm having problems VBA code that exports a table from MS Access 2010 to an Excel 2010 format using the `DoCmd.TransferSpreadsheet` command. The code runs without error in Access and the file is created. However, when I try to open the file in Excel 2010 I receive the following error message:
 Excel cannot open the file 'XXXXX.xlsx' because the file format or file 
 extension is not valid. Verify that the file has not been corrupted and 
 that the file extension matches the format of the file.
Here is the code I use to setup for and then execute the export:

```
exportFileName = "\\network1\share$\filename_" & ".xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "tablename", exportFileName, True

```

I looked at a number of possible solutions before posting, so I have tried 

* replacing `acSpreadsheetTypeExcel12` with `acSpreadsheetTypeExcel12Xml`
* replacing `acSpreadsheetTypeExcel12` with the integer `10` or `9`
* ensuring that I had full access/permissions to the directory where I was saving the file
* opening the file from the `File -> Open` dialog rather than double-clicking the file
* saving the file to a local location, i.e. "C:\Users\paul\Documents\"

None of these solved the problem.

The one solution I found was as follows:

```
exportFileName = "\\network1\share$\filename_" & ".xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tablename", exportFileName, True

```

where the extension is `.xls` and the spreadsheet type is `acSpreadsheetTypeExcel8`. I can work with this for now, but I would appreciate any other possible suggestions.