CSV Writer is not retaining leading zeros.

Hi there KNIME community,

I am using a Column Expressions node to update a column of Employee ID’s so they are always 6 digits long. If shorter (1234), a leading zero is added (001234). This is working perfectly. I have adding an Excel Writer node after it, and it correctly retains the leading zeros. HOWEVER when I replace the Excel Writer node with the CSV Writer note, it removes the leading zero’s and reformats the data back to a number.

What am I doing wrong?

Thanks! :slight_smile:

Most likely conversion to number do the reading tool you use. If you use a transformation tab of CSV Reader and map ID to string you will see the leading zeros.

6 Likes

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