This just gives you a general idea what could do.
Create a staging table in SQL Server
CREATE TABLE dbo.ExcelStaging
(LineId INT NOT NULL IDENTITY(1,1)
, FileLine VARCHAR(2000)
, FileName VARCHAR(50)
)
Truncate staging table before import each of your file.
Create script task, read every line of your file and insert into staging table colume ‘FileLine’. LineId=1 should always hold the original file column header. You must careful choose which delimiter, comma separator or fixed width?
Once file loaded into your table, execute SQL task – a stored procedure
a. based on the filename and FileLine where LineID = 1, create a new SQL table. The new table may look ugly – every column data type is varcher, since don’t know advance what data type is for each field.
b. Insert into new table select substring of FileLine as columns from staging table. Here the delimiter you choose will determine how you substring for each column.