Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error with SSIS and Excel


Error with SSIS and Excel

Author
Message
imani_technology
imani_technology
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 777
I am trying to use the Excel Connection Manager in SSIS 2008 R2. I have set Run64BitRuntime = false. I have tried to process several .xls files that have one worksheet. But I get an "unexpected error from external database driver (22)" message from them. When I use the original worksheet tab name (for example, POS Report-XXXX BRANDS-YYYYYYY), I get the error. But if I rename the worksheet tab something simple like "TEST" I don't get the error. Is there a way around this other than manually renaming the tab for each .xls file?
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16465 Visits: 13207
The space in the name is possibly the issue.
Try writing a SQL query to your Excel file instead of just selecting the sheet name in the dropdown list.
There you can put the sheet name in brackets, what will solve the issue:

[POS Report-XXXX BRANDS-YYYYYYY$]



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
imani_technology
imani_technology
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 777
I tried

SELECT * FROM [SHEET NAME$]

I received the following error. Is my syntax incorrect?

TITLE: Microsoft Visual Studio
------------------------------

Error at XXXX_YYY_WEEKLY [Connection manager "Excel Connection Manager 1"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unexpected error from external database driver (22).".

Error at Data Flow Task [Excel Source [29]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager 1" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.



------------------------------
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16465 Visits: 13207
There is a query builder that you can use. That way you don't have to worry about syntax.
I would advise you however not to use SELECT *, but to specify the column names.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
imani_technology
imani_technology
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 777
When I try the query builder I get the following error.

TITLE: Microsoft JET Database Engine
------------------------------

Unexpected error from external database driver (22).

------------------------------
BUTTONS:

&Retry
Cancel
------------------------------
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16465 Visits: 13207
You don't have the Excel file open, so it is locked?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
imani_technology
imani_technology
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 777
I corrected the SQL syntax so now it works.

SELECT [POS Report-XXXX BRANDS-YYYYYYYY$].*
FROM [POS Report-XXXX BRANDS-YYYYYYYY$]
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16465 Visits: 13207
imani_technology (4/19/2011)
I corrected the SQL syntax so now it works.

SELECT [POS Report-XXXX BRANDS-YYYYYYYY$].*
FROM [POS Report-XXXX BRANDS-YYYYYYYY$]


Ah, apparently the table needs to be aliased. Strange...

But my advise still stands: drop the * and use the real columns.
If someone types into a non-used column and then deletes the data, SSIS will still think there is a new column and it will add the column to the dataflow, resulting in a package failure.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
imani_technology
imani_technology
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 777
I spoke too soon. When I try to run the package, I get the following error:

Error at Data Flow Task [Excel Source [29]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.


Error at Data Flow Task [SSIS.Pipeline]: component "Excel Source" (29) failed validation and returned error code 0xC020801C.


Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.


Error at Data Flow Task: There were errors during task validation.


Error at XXXXXX_POS_WEEKLY [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unexpected error from external database driver (22).".
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16465 Visits: 13207
The package already fails at validation. Does the package has permission to access the folder where the Excel file is stored?
The Excel file isn't locked by another process?

This may sound silly, but have you tried turning it off and on again? :-D
Restart BIDS, it may help.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search