XLS Reader - How can I to check if a sheet name exists?

Hi All,

I'm using an XLS Reader node as input data file in my workflow.  I need to check if a sheet name exists and trap the error if the sheet is not present.  Is it possible to do that in Knime?  If yes, how?

Thanks in advance for your help,

Cheers,

Claire

Hi Claire,

You want to look into the Read XLS Sheets Name node. The node provides a list the sheet names within an XLS workbook. Once I have the list, you can use a Row Filter node to isolate the sheet name you are looking for (use the sought for name as a pattern). If that sheet is present, you end up with a table with one row. If that sheet is not present, you end up with an empty table. You can then use the Empty Table Switch node to recognize in which situation you are and follow alternative execution paths.

As usual in KNIME, there are other ways to solve the same use case, for example using Flow Variables and an IF node.

Cheers,
Marco.

Hi Marco,

Great, thanks a lot!

Cheers,

Claire