Reputation: 11
I am trying to pull data from SQL into an Excel spreadsheet however, the sheet needs to show the data in a specific format.
I am using functions in SSIS to pull the data onto an excel sheet but I need further transformation to create a specific excel format
This is how I want it to look, EXCEL SPREADSHEET (see screenshot)
Notice the spaces between PRODUCTA and PRODUCTB in the SKU column are BLANK.
I can load the data from SSIS into Excel, but I can not find the functions to transform the excel sheet into this format
Upvotes: 1
Views: 215
Reputation: 26
Use the data conversion component in ssis toolbox. There change the desired format for each column
Upvotes: 0
Reputation: 37368
There are two approaches you can go with:
If you have a row_number column (similar to TIER_PRICE shown in the image), you can simply add a derived column with as similar expression:
[TIER_PRICE] != 5 ? NULL(DT_I4) : [TIER_PRICE]
After importing data to Excel, you can write a C# Script Task and use a library like Microsoft.Interop.Excel to apply the transformation you need.
Upvotes: 1