SSIS - output excel based on template

nononame2021 261 Reputation points
2022-06-17T09:02:08.167+00:00

i have a template like the attached image, first the first row , theses column header are merge cell. (for address and tel header at the first row)

i have prepare the sql to extract the data and fill in excel, for the merge fields, how can i fill to correct position to C3,D3,E3 and F3 and export to excel or csv (which one is better for output?)

output excel template
212430-image.png

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2022-06-17T09:13:59.243+00:00

    Hi

    First let's load data to excel manager connection with code about the data scope, we may preview as below. And then click the columns, we could edit the column name as you want.

    select * from [Sheet1$A2:F3]  
    

    212439-image.png

    212408-image.png

    Export to excel or csv depends on your own requirement, both are good.

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.