Excel Cell Updater Problem (string vs number)

Hi dear KNIMERs,

I recently encountered a problem with the Excel Cell Updater.

Per definition of how the Excel Cell Updater works, it probably nearly always contains multiple datatypes (like strings, numbers) because at the end of the day, if you fill more than just “one” column you might have more data.

However, if you write in a pre-formatted Excel template (e. g. with conditional formatting and a color shading from green to red for highest to lowest values) this all does not work anymore.

If you write the content “as is” Excel will return some strange errors.

If you convert them to e. g. string, all formatting gets lost, which in return renders the Excel cell updater useless (to use as a templating engine).

Here’s what it creates:

Here’s what it should create:

Here’s the example workflow for this:

Any idea how to solve this problem?

Hi @kowisoft , all I can think of at the moment is making it a “two-pass” approach. Separate off the updates for numerics, and apply these first, then apply a second Excel Cell Updater using the intermediate file as the new template file:

Format Excel Output - Example - 1.knwf (872.6 KB)

hope that helps! :slight_smile:

Edit… and having said that this was all I could think of, I reread the doc on the Excel Cell Updater :wink:

What you can do is this…

This turns your ref table into this:

and allows you to perform a single call to Excel Cell Updater

Format Excel Output - Example - 2.knwf (873.7 KB)

For convenience, I’ve packaged the functionality in that second example into a component:


Format Excel Output - Example - 3.knwf (879.2 KB)

1 Like