I believe this is close to what you need. You basically have three steps:
- Read A:I (dt1) and J (dt2) as separate datatables
- Work out how many columns you need added to Dt1 and add them.
- Cycle through dt2 adding each row item to dt1, moving onto the next row when required. This is done by monitoring both row index of the dt2 item and the target column index of dt1.
Source file looks like:
Output looks like:
UnstructuredExcel2.zip (9.6 KB)
edit: just realised its been solved above, the solution here does not use LINQ if you prefer