Dynamic Excel File

  • All,

    I have a requirement where i need to dump data from DB to an excel file in a particular path. Further, this file need to be created dynamically based on few params, here for ex, we can say date...

    For the Excel connection manager, i had set the ExcelFilePath to a valid path and placed a sample xls file to map the columns. Then i created a variable which will be populated with value from SQL which i set as an expression for excelfilepath. When i execute, i get an error, file not found i nthe specified path, though i could do the same using flat file.

    Please help.

  • Try thinking of it this way:

    An Excel Workbook is a database and a Worksheet is a table. An .xls/.xlsx file is not the same as a flat file and SSIS cannot create one on the fly because it must have a structure already defined (similar to a database schema).

    What you need to do is first issue a File System task to copy your sample xls file to to the destination before you hit the Data Flow task that will require the xls file to be there.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Hi, Thanks. I have followed the approach and it works fine now. 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

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