Extract cell from multiple excel files

How can I ger the cell G20 from many different excel files? I have more than 50 files to read.

Please see the example of the excel files attached

SIV2602205.zip (161.7 KB)

The output is the file name and content of the cell G20.

May you help me?

I´ve saw the loop at the topic https://hub.knime.com/knime/workflows/Examples/06_Control_Structures/04_Loops/02_Example_for_Reading_a_List_of_Files*UPm1nNWmew1uu2L0

but could not read my file in this loop.

Thank you!!

Here’s a modified example of the workflow you linked that reads a single cell from your zip file of Excel files:

Example_for_Reading_a_List_of_Files_Excel_Modified.knwf (968.1 KB)

In this case I had it read cell H35, but that’s adjustable inside the Excel Reader node. Results:



@ScottF was faster, here I have a bit different workflow and some explanation:

Excel_G20.knwf (29.9 KB)

Just change the “Location” in the List Files node and this will work fine for you if the value you are looking for is in G20 cell in all files. Your example Excel files had nothing in G20 for 2 first files so I modified them to be the same as the third file which has the exchange rate in cell G20.

The url variable is passed from the Table Row To Variable Loop Start node to the Excel Reader node.
In the configuration window of the reader node uncheck the “Read entire data sheet, or …” option and input the cell column and row:

I extracted the file name using regex in String Manipulation but it seems easier to use URL to File Path (Variable) used by @ScottF. The Constant Value Column adds the file name.
The Column Rename and Resorter nodes to make everything clean.



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