Problems evaluating input data

Hi everyone,
I’m new to KNIME and this is my first post.
I have a problem with my KNIME workflow.
I have an excel reader at the beginning of the workflow reading material numbers of 7 digits which are then calculating a value based on these numbers + other worksheets.

In the excel file there is a formula that makes sure that only 7 digit material numbers are inserted. However, whenever they start with a 0, excel deletes the 0 automatically and I have to manually write the correct material number in the cell in order to not have a number of only 6 digits.

KNIME seems to have a problem working with this kind of number (starting with 0) every time and I’m wondering how I can fix this issue.

Can I change something on my excel file or can I use a certain node in KNIME to avoid this error?

Thanks in advance!

Hello @IE309
At some point in your processing, numbers (integers?) are read as numeric.

Aiming to handle seven digits code as text, you can use a ‘String Manipulation’ node with the following code:

padLeft(string($material_numbers$), 7, "0")

BR

3 Likes

You can try the transformation function in the Excel Reader node to transform the numbers to strings which should retain the leading 0.

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