SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ExcelFilePath disappears after setting the ConnectionString dynamic (Expressions)


ExcelFilePath disappears after setting the ConnectionString dynamic (Expressions)

Author
Message
WilburSmith
WilburSmith
Mr or Mrs. 500
Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)

Group: General Forum Members
Points: 519 Visits: 234
Hi,

I have two similar SSIS packages and the other one works fine but the other does not.

I have two template excel files in a dir and they are set as the source excels in the connection manager in each package respectively. Why do I have those templates is that at least for me, unlike with Flat File connections, the Excel-connections does not obey the 'DelayValidation = True' setting, instead there has to be the file present with the same name.

This is not the cause of my trouble though.

In the other package the ExcelFilePath disappears after setting the ConnectionString dynamic (Expressions). The other one works fine. I have tried to delete and do the connection again but no luck. I just don't get it. Could some one open my eyes please!

Ville

VisualStudio 2008
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61935 Visits: 13297
What do you mean with dissapears?
What is the expression?

Regarding the need for an Excel file to be present: unlike a flat file, you need to look at an Excel workbook as a database. The workbook is the database, the sheets are the tables. When you write data to a database, you'd expect the database and the tables to be there, don't you?


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

MCSE Business Intelligence - Microsoft Data Platform MVP
WilburSmith
WilburSmith
Mr or Mrs. 500
Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)

Group: General Forum Members
Points: 519 Visits: 234
The field clears...

But I just remembered that I had a perfectly well working project with same kind of situation and with Excel sources you must have the ConnectionString expression in the format below:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::CSVFile] + ";Extended Properties=\"EXCEL 8.0;HDR=YES\";"

(I only had @[User::CSVFile] - this is painful that SSIS won't generate it in the format...)

and

in the Variables sheet ( SSIS / Variables menu) you must have the Value set to the existing template file:

D:\kespro\input\DO_NOT_REMOVE_CustomerMasterTemplate.xls


Ville
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