Excel Destination with Run date-1 inside the file not the file name

Hello,

I have a ssis package where I need to have excel destination.  In the Excel file, I need to have few rows with some text and then populate data below the text. One the text is like this:

Data as of:  08/25/2015

if the report ran today, then Data as of will have Yesterday. So, if the user opens that excel file after a week, then user should see same  Data as of:  08/25/2015. not today()-day(1).

I was planing to handle on excel side with today()-day(1). but it only works the day it was run. Then the excel file is open after few days later, then it might as Data as of:  08/30/2015 which is not true. It should still stay Data as of:  08/25/2015 on what ever date the excel file is open. The SSIS package  runs only once. 

How do I handle this so that whenever user open the file, they will see Data as of:  08/25/2015. This is not a column in excel. It is like a description of data in excel.

August 26th, 2015 6:36pm

You can write to Excel using SQL
INSERT INTO [Sheet1$D2:D2] VALUES ('2015-08-25')
The SQL part can come as part of a SSIS expression I suggest
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 9:13pm

Thanks for the response.  I have oledb source which has a query and destination is excel file Template where I need tp populate data. My excel file name is ABC which has sheet name XYZ.

Do I need to use Execute SQL task component to do that?  Please  give  me  some detail steps? Thanks for help.


  • Edited by 1234alex Wednesday, August 26, 2015 9:47 PM
August 26th, 2015 9:34pm

Thanks!
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 3:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics