Find cell in excel files - Variable

Hi pals

You have ever helped my friend @agalloro with this in the topic Extract cell from multiple excel files but we need a little more help.

Now we are trying to seek and catch into each spreadsheet the total ammount located beside the cell “TOTAL DUE” (As it is located in a variable place in each spreadsheet, we can’t apply the solution mentioned in that topic)

Could you please help us one more time?

Thanks in advance

SIV2602205.zip (186.0 KB)

Hi @Rodrigo_Melero

I created this workflow find_cells_in_excel_file.knwf (58.8 KB). It loops over all the files in your directory. Then with the chunk loop every row of the Invoice sheet is checked for “TOTAL DUE” . After checking the total amount is filtered by a cell spliiter. Hope this helps.

gr. Hans

4 Likes

Great solution, and I’m glad you included the list files and loop for reading excel!

Here’s one more solution if you’re comfortable with the Column Expressions node, it should run a bit faster as it doesn’t require the interior loop.
It checks if a row contains a “TOTAL DUE” cell and if it does returns the next cell’s value to a new column. That new column is then summed in the GroupBy node.
image
Total due.knwf (9.3 KB)

The Column Expressions node on the KNIME hub

3 Likes

I have applied the workflow sent by @HansS and it worked wery well. :slight_smile:

I will study the node Column Expressions a little more. I didn’t know it, but realize that it can be so useful in our work.

Thank you very much for your help, guys!

2 Likes

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