Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
462 views
in Technique[技术] by (71.8m points)

sql - SSIS hidden sheets as Excel Destination

As occurring more often something simple is not so simple in SSIS (v 2008)

Situation before B.I. came in: data was loaded into linked tables in hidden excel sheets, there were macro's and manual adaptations.

After: Still hidden sheets but we replaced macro functionalities with SSIS and had to unlink the table to get rid of the pop-up when opening the files: "The following data may have been lost: -Table"

Since we unlinked the table (and by consequence deleted the connection) we can't address the hidden sheet anymore via SSIS: Excel Destination. Non-hidden sheets are no problem and are visible.

--> Question: how can you export to a hidden excel sheet? Since above action the sheet is not visible anymore in the Excel Destination windows, dropbox "name of the excel sheet".

Thanks in advance for any advice!! L

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The trick when the GUI doesn't let you do something in SSIS is to tell it you know what you are doing. ;)

In this case, the drop down does not allow you to select values from a hidden tab. The connection manager points to a Excel file with 2 tabs, Sheet1 and Hidden which is hidden. Excel Destination table or view

It does however allow you to select "Table name or view name from variable" or "SQL Command." This solution will use the variable approach but command should work just as well. Excel Destination table or view from variable

As you can see, I have defined a variables called SheetName and assigned it a value of Hidden$ Variable declaration

Sample data flow

Data flow

Results

Progress: 2011-11-07 07:49:32.80
   Source: Excel Destination
   Cleanup: 100% complete
End Progress
DTExec: The package execution returned DTSER_SUCCESS (0).
Started:  7:49:30 AM
Finished: 7:49:32 AM
Elapsed:  2.121 seconds

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...