Hi All,I have different format of spreadsheets which are then imported to SQL table.Column headers, which can be on top row OR 3rd row or 2nd row etc, of the spreadsheet has to be identified one by one and to be put in the table as rows. So e.g.,Spreadsheet 1:Row 1: Langhill Herd - Calving RecordsRow 2: BlankRow 3: Freeze_Brand Ear_Tag Lact_No
Spreadsheet 2:Row 1: Column1 Column2 Column3
In above spreadsheet 1 example Row # 3 contains three column names which should go in a sql table(tblColumnInformation) like this:ColumnorderId ColumnName1 Freeze_Brand2 Ear_Tag3 Lact_No
Similarly for Spreadsheet 2 example Row # 1 contains three column names which should go in a sql table(tblColumnInformation) like this:ColumnorderId ColumnName1 Column12 Column23 Column3
The way I import the excel file into the SQL table is by inserting the identity column so the table comes out for spreadsheet1 like this:intOrderBy F1 F2 F31 Langhill Herd - Calving Records NULL NULL2 NULL NULL NULL 3 Freeze_Brand Ear_Tag Lact_No
From above example, I want intorderBy = 3 row information to be inserted into the table: tblColumnInformation with the columnorderId as they appear.Any suggestions here will be really helpful and be much appreciated.Thanks in advance.