How to Dynamically and Iteratively Populate An Excel Workbook from SQL Server

  • Very nice article. I am sure I will be using the techniques introduced here in the near future. Some minor complaints: the screenshots at the end (dealing with variables) seem a bit off (specifically the one showing ExcelTab variable, which in fact belongs to ExcelFileName), also the package provided for download is a little different (variable names) from the article, but like I said, this is not a big deal.

    Thank you!

  • It would be an excellent article if it was better written. Poorly written which takes a while to read through and understand which is unfortunate as there are some very good and informative points raised

  • What is the actual Expression used in the Excel Connection Manager? The screen shots in your original article are too blury to read, and your followup post simply left it out:

    "Set the Excel Connection (notice that usually you specific connection 1, connection 2 etc but here NO specified number) to use a New Property expression. In the New Property expression and add the variable defined for the Excelsheet name. This variable references back to the cursor (called in this case 'Region' . . ."

    Could you simply write the expression, please?

    Really appreciate it.

  • What is the actual Expression used in the Excel Connection Manager? The screen shots in your original article are too blury to read, and your followup post simply left it out:

    "Set the Excel Connection (notice that usually you specific connection 1, connection 2 etc but here NO specified number) to use a New Property expression. In the New Property expression and add the variable defined for the Excelsheet name. This variable references back to the cursor (called in this case 'Region' . . ."

    Could you simply write the expression, please?

    Really appreciate it.

  • Anyone having problems reading the graphics please note your contact address/email here and I will send you a copy of the article. (if you don't mind)

    At this time I am not actually working with SQL Server, rather with Oracle tools so don't have them loaded right now. Sorry about that!

  • Terrific article. I used it with some modifications to realize a huge time-saving project.

    Many thanks!

    - Simon D

  • Glad it was useful for you!

  • Excellent and informative article. I, though using SSIS for last couple of years but still love the simple DTS designer tool of SQL Server 2000 version than the complicated SSIS of 2005/2008. I agree, with SSIS we can accomplish more than what one can with DTS. But still, DTS is DTS.

    Thanks for the article.

    SQL DBA.

  • Good, well-written article and having worked with SSIS, not too hard to understand and follow. I suppose if you had to generate this kind of Excel output on a regular basis, this code would be most helpful.

    However, it also highlights the often painful complexity of SSIS to the uninitiated and one must consider whether simply running a bunch of queries then copying and pasting the results - or - simply running the queries from the excel side are not more overall time-efficient, less tedious and complex approaches.

    Still, excellent and creative work, nicely documented.

    There's no such thing as dumb questions, only poorly thought-out answers...
  • Nice article. Does this work with the 64 bit Excel driver?

  • nice ressurection of one of my more favorite bookmarked discussions. 🙂

  • Hi,

    Pls help me with more details on the @User::SubsidiaryName as there is nothing mentioned in article

  • Hi,

    Pls help me with more details on the @User::SubsidiaryName as there is nothing mentioned in article

  • Hello to all Gurus,

    I am a newbie and need a step by step help. I am attaching herewith sample .dtsx and .bak ( both zipped separately) from my environment.

    The scenario i was trying is given below :

    Tables in focus dbo.CustTable & dbo.CustGroup

    both tables are linked with the field CustGroup.

    There are different working company for an application instance which is defined as "dataareaId" in each table.

    I would try to create one file dynamically for each distinct dataareaid in CustTable and within a workbook create worksheets for a distinct CustGroup and each worksheet will then have the CustTable data for that CustGroup.

    I have tried to follow the article but i am stuck at the excel destination . It says "the excel file name is not provided".

    Help me

    There would be a need to change the connection to use the attached the database instead of the ince in the .dtsx file.

    I have now attached the updated files for your review. Pls help

Viewing 14 posts - 46 through 58 (of 58 total)

You must be logged in to reply to this topic. Login to reply