Append columns from different Excel files to a single worksheet

I have been struggling to append columns from different excel files into a single worksheet . The only thing I have got right is taking the filename and appending it as column headers.
I have uploaded my workflow together with the workflow I tried to follow but I still could not resolve my column append problem. I also can’t view the settings on the file reader node that I am trying to follow because it is deprecated.
All I need is for the column from every sheet to append under the column name that has been created for each file on the single worksheet. but when it runs it reads the initial file selected in the reader node over and over for as many files as listed in the list file node. Can anyone help, please? @paolotamag

Add filename to column headers and append columns.knwf (1.2 MB)

Hello @adesinoh
What I’ve seen in your workflow is that your Excel Reader is configured to ‘Read the Files in Folder’

You need to remove your 4th node (Column Filter) and send all the columns to the variable.

Then configure your Excel Reader to read from Path variable. You can link the Variable reference by clicking the icon besides the Browse button.

I think this is how to solve it .

PS.- You can also identify from your actual Excel Reader configuration the original file with the option Append Path Column from Advanced Settings. Then change your transformation by manipulating the column with Path and step on it for pivoting. In this approach all the nodes before the reader are not necessary (?)


Thanks @gonhaddock . I changed the mode to read a single file from the path variable and it worked perfectly.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.