Hi,
You can do in tow ways. You can create an Excel file with those predefined columns, essentially your empty output file – this would act as your ‘Template File’. Your flow would then be this:
- File System Task – Copy template file to output or working directory (rename if necessary)
- OLEDB Source Task – Query your source for the data (3000)
- Data Conversion Task
- Excel Destination Task – Put data into new Excel file
Note: You already have steps 2 thru 3 complete, you just need to make sure you are connecting to the new Excel file. Also, to clarify, step 1 is outside the Control Flow Task.
This way is helpful because you always have a blank and consistently formatted Excel file to copy and work with.
or
The other option is to use a Script Task and create the Excel file – you could also load the data into the file in this task. This requires some basic understanding of VB.NET or C#. Basically you would need to get a XLS library (like NPOI). This is more complicated, but gives you the best functionality.
Hope this helps.
Discuss This Question: 1  Reply