Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSIS Excel Import Columns with More or Less than 255 Characters

Status
Not open for further replies.

Suru_07

IS-IT--Management
Dec 20, 2017
1
0
0
US
I have an excel file with columns that may have more than 255 characters but sometimes the number of characters may be less than 255. In this case changing the registry value to check the whole sheet versus the first 8 rows does not work because on one file there may be more than 255 characters and on other files every row may have less than 255. How can this be handled with SSIS and Excel?
If you set the output of columns that could be greater than 255 to [DT_NTEXT] it works when that is the case, but if all the rows for that column are less than 255 then you get the error: Failed to retrieve long data for column Using the ACE OLEDB 12.0 provider and setting IMEX=1 in the connection string still gets this error.
 
no option with SSIS itself - Excel driver (Both Jet and ACE) all have the issue that they always scan the files on open and change metadata accordingly.

Alternative is to either use a third party driver or use a C# source component script to read the file (using the ACE driver), do validation of the data type and convert before passing down the row to the SSIS buffer

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top