4

I am facing an issue while using Excel file as source in SSIS.

I have a Excel source file with extension xlsx received via email.

When I create a excel source for this this file all the Sheet names appears correctly in the Excel Source Editor of SSIS.

However when I try to select columns of the excel sheet i get following error

Exception from HRESULT: 0xC02020E8 Error at Data Flow Task [Excel Source [1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.

Error at Data Flow Task [Excel Source [1]]: Opening a rowset for "RED$" failed. Check that the object exists in the database.

I can confim:

  • Excel file dos have sheet name RED and it dose not contain $ sign.
  • Delayed Valuation = True
  • Project debugging mode is 64 bit is set to false.

Strangely if I open the file and save it manually without making any changes to the file and then try to create excel file connection manager then it works perfectly without any error.

How do I resolve this error as its not possible to manually open and save file before execution of package.

1 Answer 1

2

I had the same problem.

I resolved it by renaming the Excel file to something standard -- meaning no spaces in the name, no periods in the name, etc. Just something like FileName.xlsx.

Strangely enough, SQL Server was able to import the data from the original poorly named Excel file. I finally decided to save that import as an SSIS package. When I would open the SSIS package, it wouldn't run.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for this tip. It was working fine on our test server with a long file name (i.e. with spaces in), but for some reason on our matching prod server (same Windows, same SQL, same patches, same config) it was failing. Renaming the file to a simple file name with no spaces solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.