How to create table dynamically in ssis using the data from rows of flat file

Anjali Shah 21 Reputation points
2022-01-12T12:31:55.857+00:00

I have a excel source with following fields:

excel

I want to create table dynamically with First 4 rows having column name, data type & length. Eg for Decimal its (10,2).
Then import data from excel to SQL database with Data starting from Row No. 5.

How do I achieve the same?
Any help is appreciate.
Thanks

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

3 answers

Sort by: Most helpful
  1. Olaf Helper 40,901 Reputation points
    2022-01-12T14:45:44.477+00:00

    That's not really possible in SSIS using build-in tasks.
    The only way would be a .NET script task with a lot of .NET (C#/VB.NET) programming.

    0 comments No comments

  2. ZoeHui-MSFT 33,126 Reputation points
    2022-01-13T02:49:23.017+00:00

    Hi @Anjali Shah ,

    You may use Script Task to create table and load the data to the table.

    Here is a similar blog you may have a check.

    http://www.techbrothersit.com/2016/03/how-to-create-tables-dynamically-from.html

    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.

    0 comments No comments

  3. Anjali Shah 21 Reputation points
    2022-01-13T05:25:29.393+00:00

    Hey @ZoeHui-MSFT

    Below is the link to the excel source file.
    EUVwndvJuvlGrpxAMcWBA88Bddxe3bF0NO76Z2g_qkAEaA

    It would be great if you can help!
    Thanks.