I'm having an issue processing an excel file with SSIS unless I manually open the file and click 'save'.
I've noticed that it doesn't mater if the file is .xls or .xlsx
The file is downloaded to excel from an SSRS project
I am able use a File System Task to move, rename, delete, etc. the file, but when I try to use a dataflow task to access the contents inside the file I get an error that the external table is not in expected format.
I then have to open up the file, click save, and the file processes fine.
Not sure if this means anything but....
I've noticed that when I open the original file in notepad the top line includes with:
After I save the file the top line changes to:
Using Microsoft Visual Studio 2012.
Error: 0xC0202009 at TransferMoneyReconcile, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft Office Access Database Engine" Hresult: 0x80004005 Description: "External table is not in the expected format.".
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\192.168.234.567\ftp\Sample\Money\Archive_Transfer Money to Manager.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=NO";
any help/suggestions are appreciated!
XLSX extension is of 2 types.
Excel workbook (let's call this type 1)
Strict Open XML Spreadsheet (let's call this type 2)
Both the above have the .xlsx extension.
To see this yourself, you can open the excel application, create a new file, click on save and notice the type 1 (located at top of the list) and type 2 (located at the bottom of the list).
The default option is type 1 - Excel workbook. So when you create a new file and save, it will get saved as type 1.
Based on my testing, however, when you open a type 2 file and save, then it may get saved as type 1 or type 2. This behaviour is not guaranteed.
Anyways, to resolve the error you are facing, open the file and save it (via save as) and choose type 1 format. Then test the SSIS, it should run without the error.
Does the ConnectionString property for your Excel Connection Manager look like this?
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=U:\Company Sales 2008.xls;Extended Properties="Excel 8.0;HDR=YES";
Changing it to this should solve your problem:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=U:\Company Sales 2008.xls;Extended Properties="Excel 12.0 XML;HDR=NO";
User contributions licensed under CC BY-SA 3.0