Hello Everyone,
We are trying to Load data from several Excel Spreadsheets into SQL Server Tables.
For this purpose, we are using SSIS to read and load the data. However we have found that the Excel data is not getting loaded properly into the SQL Server Table. Basically we noticed that if there is an Excel Column with All Integer Values in the first 8 rows and then it holds Character or Alpha Numeric values in the rows below, the system by default identifies that column as an Integer column and sets all the cells with Character or Alpha Numeric values as NULL.
The SSIS Excel connection manager nor the Excel Data source gives me an option to manually alter the expected data types.
This issue has been very heavily discussed in several forums but Microsoft has not given any solution for this till date.
Here is a sample excel file:
When i try to import this in SQL Server Table using SSIS, this is how it shows the data preview:
Many people have suggested Windows Registry Edit to force excel to read all records before deciding on the data type. This is not possible in my case as the clients will not allow us to play with the registry settings of the system.
Some have suggested to add "IMEX=1" Extended Property in the Excel Connection String. This is not working for my case.
Some have suggested to add "TypeGuessRows=99999" in the Extended Properties of the Excel Connection String. This also does not work in my case.
I have no control in the way the excel is being generated or formatted, hence having additional hidden text rows before the actual data starts, or having the cell format as TEXT for all the columns of excel is also not an option for me.
Below is the standard connection string from the Excel Connection Manager that i currently have:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\suvrat\Desktop\RawExcel.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";
This is such a simple requirement, but unfortunately i could not find any useful solutions to this problem.
Any thoughts on how this type of data can be loaded into the system?
Thanks in advance!
Suvrat