Exponent issue with CSV Writer

Hi All,
I need a suggestion with CSV writer…
The issue is for large number when written in CSV writer, I see Exponent on it.
I tried all the solutions suggested , i.e. Round Double Node, Java Snippet, Disabling Scientific Notifications in CSV Writer but still it keeps coming.
Output has to be in CSV for client. I tried excel as output as well, still the same issue.

Kindly suggest possible solutions for this.

Thanks

Hi there @nd1992,

add some dummy data and share workflow example? Also some picture what you see and what you would like to see would help :slight_smile:

Br,
Ivan

Hi @ipazin
I have a column with large double values
image

When I write this into CSV, I get output like this
image

Tried Numbers to string,
also tried Round Double node with Plain string option
Also tried Java Snippet with the code - out_BigNumber = String.format("%.0f", in_BigNumber);

Turned off scientific notations in options of CSV writer.
Still the output comes with an exponent. :slightly_frowning_face:

Hi there @nd1992,

which KNIME version are you running? What OS? With default CSV Writer node settings works for me normally. I have attached example. Can you check it?

2020_05_08_CSV_Writer_Notation.knwf (11.3 KB)

Br,
Ivan

2 Likes

Hi @ipazin
KNIME version is 4.11
Windows 10 on Citrix
Tried defualt settings as well, doest work.

Tested the workflow you attached, same issue
image

Hi @nd1992,

but you are opening it in Excel. Maybe your Excel automatically detects columns and appropriate format cell for each. Have you tried opening it in text editor? Notepad++ maybe?

Br,
Ivan

2 Likes

Hi @ipazin
Sorry for the late reply.
It works in the notepad. But the expected output is CSV (through excel), hence asked. Is there a setting that need to be done in CSV/Excel ?

I’m pretty sure you just wrote that looking at the file with notepad shows the correct data, and looking at the file in something else (Excel) shows the data in a fashion you don’t want.

This means that the data is written out correctly is the CSV file and it is Excel that is choosing to render the column in exponential form. This is an issue with Excel that you can address by changing the column rendering in Excel after you have read in the CSV.

A CSV file is simply a file of text that separates its values with commas (Comma Separated Values) - it can provide no hints as to the data types of those values (and so it can’t even begin to suggest how a program should render those values.)

2 Likes

Hi @nd1992,

as @quaeler mentioned you can address this by changing column format once you open your CSV file in Excel.

Br,
Ivan

1 Like

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