Load multiple excels with different structures

Hello Everyone,

I have three excel files with different structures. See below.

Table : 1 AuditID TransactionID Date Name XXX XYZ

Table : 2 AuditID TransactionID Date Name YYY

Table : 3 AuditID TransactionID Date Name ZAAA ZBBB ZCCC

Output AuditID TransactionID Date Activity Activity_Value

The Activity column has all the non-matched column names from the above 3 tables, the Activity_Value column has the values of it.

How do i achieve this? The structure of the excel files will be changed on a daily basis.

With SSIS foreachloop, we can't achieve this because of non-matched columns of all the excel files. Any other solution for this?

Thanks in advance, Pradeep S

more ▼

asked Mar 12 at 09:39 AM in Default

avatar image


@pauwnrajpp This looks like a pretty trivial task via openrowset, there is no need to wheel out the for each loop for something like this, assuming that the number of Excel files is the same, just the structure of each file is different. Please post some sample data (few rows from each spreadsheet) and desired output. Thank you.

Mar 12 at 01:37 PM Oleg
(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Mar 12 at 09:39 AM

Seen: 15 times

Last Updated: Mar 12 at 01:37 PM

Copyright 2018 Redgate Software. Privacy Policy