SSIS. Importing several xlsx files

1

I'm stuck with a SSIS package that I created for importing xlsx files to a database. Since some files have data with more tan 255 characters, I setted that column to DT_NTEXT. If I just leave a xlsx file that I know that has this long data, the package works fine with no erros. But, if I leave all the files that need to be imported in the import folder, I get next erros:

[VENTA_IMS_EXCEL [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E21.

[VENTA_IMS_EXCEL [1]] Error: Failed to retrieve long data for column "F17".

[VENTA_IMS_EXCEL [1]] Error: There was an error with output column "SubFamilia" (16693) on output "Excel Source Output" (9). The column status returned was: "DBSTATUS_UNAVAILABLE".

[VENTA_IMS_EXCEL [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "SubFamilia" (16693)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "SubFamilia" (16693)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.
The PrimeOutput method on component "VENTA_IMS_EXCEL" (1) returned error code 0xC0209029.
The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

My guessing is that the problem is that it evaluates each file for the kind of data to work with, and in the cases that there is data with less tan 255 characters, it fails.

Can anyone help me with this? How can I solve this? So it can loop and import all files with no problems.

sql-server
excel
ssis
etl
asked on Stack Overflow Apr 26, 2017 by Henry Foth Martinez • edited Apr 26, 2017 by Hadi

1 Answer

1

This is a common issue with excel files. The excel driver infers the datatype for each column based on the first 8 rows. Review what datatype is your datasource assigning to your column and then confirm that all values conform to this datatype.

Review this blog post: https://www.concentra.co.uk/blog/why-ssis-always-gets-excel-data-types-wrong-and-how-to-fix-it

answered on Stack Overflow Apr 28, 2017 by Fernando Sibaja

User contributions licensed under CC BY-SA 3.0