April 27, 2009 at 7:52 am
I'm using an expression in my SSIS pkg to reference my EXCEL 20007 input data source. When I attempt to evaluate the expression I receive an error --- attributed to the nest DOUBLE QUOTES around the ---> Properties="Excel 12.0;HDR=YES";
These double quotes are required. Any Ideas as to how to get this expression to successfully evaluate?
@[User::Excel2007Files] + "\\XLS_Test_Type_T.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES";"
thx in advance...
April 27, 2009 at 8:17 am
Solution: http://sqlblog.com/blogs/andy_leonard/archive/2007/07/22/ssis-design-pattern-dynamic-sql.aspx
SSIS Expressions Using nest Double Quotes
The best way I've found to do this is to write the query as I'd like it to appear, then copy it and paste it into notepad. I then replace all the quotation marks (") with slash and quotation marks (\"). (EXCEPT for the FIRST & LAST Quotation Marks)
If you then copy this and paste it into the expression builder, you merely need to nest it inside opening and closing quotation marks.
EXAMPLE:
This:
@[User::Excel2007Files] + "\\XLS_Test_Type_T.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES";"
WOULD BE CHANGED to THIS:
@[User::Excel2007Files] + "\\XLS_Test_Type_T.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=\"Excel 12.0;HDR=YES\";"
July 22, 2009 at 6:50 pm
Hello,
I had the exact same requirements of embedding " " for C:\Program Files in expression builder in SSIS.
I implemented the above solution and it worked like a charm.
Thanks,
Amol
Amol Naik
January 21, 2010 at 1:07 pm
Me, too!! I had to put double-quotes around the path inside a variable for a winzip process. Worked beautifully!!
Here's the code that fills in the argument for winzip:
"-e -o \"" + @[User::ZipFileName1] +"\""
😛
Carl Ranquist
Carl Ranquist
Data Services Manager
MTD Marketing, Inc.
January 31, 2012 at 11:40 am
Thanks for the post...this saved me hours...
July 24, 2012 at 10:39 am
Thanks! really helped, simple enough ,just place "\" before " to use in SSIS expressions.
October 10, 2013 at 11:24 pm
Thanks!!!
exactly what I was looking for.
March 12, 2014 at 3:05 pm
Thanks! That was a quick easy solution. I love this site.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply