Excel Reader: Text formatted column read as Integer

In my use case I often have to deal with numeric strings with leading zeros and those zeros do matter. eg. 00123 is not equal to 123. Yes it's s stupid system but nothing I can do about it.

This already causes troubles in excel but can be handeled by formatting these columns as text. However the knime excel reader ignores this if no value actually has a leading zero. If one does, it is correctly read as String column. The annyoing part is that I now need a conditional number to string node.

My suggestion is to always read excel text formatted columns as String columns regardless of their content.

 

 

Might not be practical, but in excel, can't you use quotes, alt a leading ' (apostrophe) ? That way excel treats anything as text independent of you formatting the cells. In Knime then it should be recognized as string directly. you might have to remove the quote/apostrophe sign via string manipulation.

Ad-hoc I can't recall which nodes to use, but an alternative thing to try is to read your file, accept it as number, convert to string and fill it up with zeros depending on length of string.

A third method - Use file-reader, check the content of file, click on column header, there you can change manually the type to string. only practical for a small number of columns though....