Continue to write an Excel file even if an empty sheet is detected

Hello,

I’m stuck with a problem here where I have a source Excel file (or other data) that I have several checks to make and after each check, write the results into their own sheet into a new Excel file.

If the contents of those checks are empty, I would like to skip the creation of the sheet and move to the next check.

For that I started using the Empty Table Switch but the moment one of the checks is empty, the workflow stops. Below is an example of what I have:

If, let’s say, the middle check (Node 86) results in empty, the bottom one (Node 92) does not continue.

How can I avoid this?

Thanks a lot!
Arky

@Arkymedes if you use an empty table switch you would have to provide an alternative what to do if the table is empty. You might just provide an empty sample table.

You will find more examples here:

https://docs.knime.com/latest/analytics_platform_flow_control_guide/#if-and-case-switches

2 Likes

Hello and thanks for the suggestion.

However, adding an alternative for when the results are empty still blocks the next iteration.

In my crude example:

image

Thanks again
Arky

@Arkymedes you will need a proper end-if configuration that can ‘capture’ the case when the table is empty and continue.

1 Like

Hello @Arkymedes

This is a workflow sketch that provides an empty formatted table table for your missied ‘End IF’ node.

BR

1 Like

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