Not on a computer right now but think this thread will help you solve it. Long story short: there’s a setting to use geheuer column headers (A,B,C…) instead of names of data in first row of a tab / sheet…
As has been noted, the Excel Reader can be configured to help handle this problem for some use cases, but whether it works for you also depends on whether the order of the columns is always the same. If in one file a “middle” column is completely skipped, then having columns returned with generic names such as A, B, C… or “column1”,“column2”, “column3” wont put the data in the right place for all files.
Extending your uploaded workflow, which uses the loop, you can incorporate the Column Renamer (Dictionary) to adjust any column names that vary, and it won’t matter where they are positionally.
I have modified your test files and added two more: file1.xlsx
file2.xlsx
file3.xlsx
file4.xlsx
Column dictionary
Output:
Make sure that in the Column Renamer (Dictionary) you don’t have it fail if a column is not present in the dictionary table. This way you only have to perform renaming that are known to be needed rather than specifying every column.
On the Loop End, make sure it allows changing table specification to allow for a varying number of columns
And regarding your explanation: “If in one file a ‘middle’ column is completely skipped, then having columns returned with generic names such as A, B, C… or ‘column1’, ‘column2’, ‘column3’ won’t put the data in the right place for all files,” I completely understand, and it’s a problem I would indeed face. The issue is that the information from one column gets concatenated with another column, but the information is different and needs to be in separate columns.
Regarding your explanation for: not flag “fail if no assignment in dictionary table,” very interesting. Now I understand what it’s for.
Regarding your explanation for Loop end: “Allow changing table specifications,” very, very interesting indeed. Now I get it. I’ve always had problems with Loop end when the structure changes before reaching the loop end.