I need to copy data using Vb.net, if possible, from one excel spreadworbook to another and put the data in the appropriate columns in an existing Excel spreadsheet. The column headings of the tables are the same, I have several templates in which to place the data, and the order of the columns in each template is different, so I need a way to find the column heading in the template, and then copy the data in this column.
Would there be a better way to achieve this with ADO?
For example, move data from this workbook1 with columns "Test1", "Test2" and data
Test1 Test2 1 2 12 23 123 234
In book 2, which will have the same column names, but may be in a different order:
Test0 Test1 Test1.1 Test2
I need to do this automatically, since I have a lot of data for copying and 30-40 book templates for copying data, the columns of the templates are in different orders and cannot be moved.
source share