Big trouble with importing excel sheet to SQL Server 2012

Hi,

I have following scenario:

  1. Installed SQL Server 2012 on WIN 2012 Server
  2. Installed SQL Management Studio
  3. Installed Visual Studio 2012
  4. Installed SQL Server Data Tools
  5. Installed SQL Server Integration Services

Everything is related to Express version.

I have a software program running on a SQL Server DB. I have and excelfile, see link here ImportFile I want to import into one specific table. Here is document showing how the table looks like TableFile When running the import guide in SSMS always end up with following error:

  • Executing (Error)
    Messages
    Error 0xc02020c5: Data Flow Task 1: Data conversion failed while converting column "Status" (189) to column "Status" (656). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
    (SQL Server Import and Export Wizard)

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[Status]" failed because error code 0xC020907F occurred, and the error row disposition on "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[Status]" 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.
(SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Data Conversion 0 - 0" (440) failed with error code 0xC0209029 while processing input "Data Conversion Input" (441). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)

Error 0xc0209017: Data Flow Task 1: Setting the end of rowset for the buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Sheet1$ returned error code 0xC0209017. 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.
(SQL Server Import and Export Wizard)

Can somebody help me with this?

/Anthony

Are you actually using SSIS or trying to use OPENROWSET from SQL Server?

e.g.:

SELECT * INTO tblTest FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml;HDR=YES;Database=C:\MyExcel.xlsx;', 'SELECT * FROM [Sheet1$]')

Looks like data conversion errors because Excel will be treated as UNICODE. You need to check your table columns, you could try changing data types to nvarchar(max).

Or use a Bulk Insert command to import the data:

BULK INSERT #mytable
FROM 'c:\myimport.csv'

WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)

GO