I have created a workbook in Excel 2010. This file allows users to enter data on various worksheets and import it in to our systems using a Web Application. The file is connected to using the following connection string:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=myfilename.xlsx;Extended Properties='Excel 12.0 XML; HDR=Yes; IMEX=1;'
Everything works fine. However, if the Excel 2010 file is opened in Excel 2007 and simply saved, then the import no longer works. I get the old "Failed to connect to Excel File: External table is not in the expected format." error.
The saved file is not open when I perform the import.
I'm not quite sure what I need to do. The connection string seems correct for Excel 2007 and 2010. Does saving an Excel 2010 file by opening it in Excel 2007 somehow corrupt it? The file extension is the same... xlsx. The workbook is password protected, has hidden sheets, etc. which are necessary.