Hi all, I have a table that I read in via read range and whose headings I need for a new data table. The problem is that the original table comes from a report whose columns change from time to time. How can I transfer the headings to a new data table without having to manually adjust the build data table each time?
He has a Source File (ReadRange) where the Header is changed after the Process is developed.
He want a new Datatable what only use the exisiting headers, without this new Header Column.
The new Column ‘Date’ should be ignored, and only the first 2 column should be used.
Example:
ReadRange old: ID, OrderNumber
ReadRange new: ID, OrderNumber, Date
WriteRange new: ID, OrdnerNumber
I try a example, and found out dtInput.Clone (only Headers) – with the new Column, and the dtInput.Copy create a copy of the Source File, with the new Headers.
Maybe a solution will be, create a Excel Template with the Header (ID, OrderNumber) and somehow ^^ the new Datatable have only the Column ID, OrderNumber with the row Data.
Create a Excel Template with the Header you need (Template.xlsx) and with MergeDatatable and MissingSchemaAction ignore you get only this column from the Template with the Data from input.xlsx