# Problem with decimal point

**URL:** <https://forum.knime.com/t/problem-with-decimal-point/38724>\
**Category:** KNIME Analytics Platform\
**Created:** [January 12, 2022, 2:31pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724 "2022-01-12T14:31:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bleck](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/8dc957/32.png) [@Bleck](https://forum.knime.com/u/Bleck)\
**Post date:** [January 12, 2022, 2:31pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724/1 "2022-01-12T14:31:20Z")

</div>

hello every one i have a bit of a pickle  
im importing a exel to knime but it keeps removing the decimal place no matter what i do if the number has a zero at the right it removes it and i cant keep both decimal places, even when i try to make that line column a string it dont work  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/e/2e952fecfe9396f37d4b661e07f03b9954aeefc5.png)  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/2/f24b9bfe60040fc04f1b836b04e354d00e1829db.png)  
in the exel it has the decimal but knime refuses to keep it no matter what, any one know how i can keep the decimal points?  
thank you for your time

---

<div class="post-metadata">

**Author:** ![Thyme](https://forum-cdn.knime.com/user_avatar/forum.knime.com/thyme/32/34550_2.png) [@Thyme](https://forum.knime.com/u/Thyme)\
**Post date:** [January 12, 2022, 7:31pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724/2 "2022-01-12T19:31:54Z")

</div>

As far as I’m aware, the Excel Reader Node looks only at the value of each cell. Any formating will be ignored.  
66.00 and 66 is the same number, with the only difference being the representation\*. You can choose between several different render methods in KNIME tables, but those don’t affect any logic or calculation, it’s just a way of displaying the values. I hope that means for you that everything is fine?  
You can change the renderer of a column by right clicking on it, then selecting a different renderer. That setting will not stick though, as it’s just cosmetic. So after each execution, it will be the default renderer again.  
If you want to export a table back to excel, you’d probably need to convert them to a formated string first, because the Excel Writer Node can, as far as I know, not do any formating.

 ![renderers](https://forum-cdn.knime.com/uploads/default/original/3X/5/e/5e8a3e1616f513a4b03b3a773227faa8097f3943.png)  
\*Yes, the extra zeros carry information about the precision of a measurement etc., but that’s beside the point 😉

---

<div class="post-metadata">

**Author:** ![Bleck](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/8dc957/32.png) [@Bleck](https://forum.knime.com/u/Bleck)\
**Post date:** [January 12, 2022, 9:16pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724/3 "2022-01-12T21:16:24Z")

</div>

the problem with full precision is that i will miss one 0, this document needs to have the exact amount of spaces so if i miss one 0 then instead of being 1 dollar and and 0 cents it will become 0 dollars and 0 cents when i import for the other program, i tried to make it as a string on the excel but Knime still refuses, makes it a double and and removes the 0, how would be a easy way to force it to keep it as string before going in Knime

---

<div class="post-metadata">

**Author:** ![Thyme](https://forum-cdn.knime.com/user_avatar/forum.knime.com/thyme/32/34550_2.png) [@Thyme](https://forum.knime.com/u/Thyme)\
**Post date:** [January 12, 2022, 9:54pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724/4 "2022-01-12T21:54:19Z")

</div>

You can choose to import as string in the advanced tab of the Excel Reader Node. This is better than formating in Excel imho. But, it seems you want to export with a specific format? (#.00 in Excel speak). Or you want to do some manipulation within KNIME?  
Then it would be better to do the number to string conversion shortly before writing the file. It can probably be done with a String Manipulation Node, but I’m more of a programmer guy, so I suggest the Java Snippet Node with a simple one liner:

> outputString = String.format(“%.2f”, inputDouble);
> 
> ![excel_reader_format](https://forum-cdn.knime.com/uploads/default/original/3X/9/1/91d3ffef1d7e6bb6e82b50f8eaa95b816e997774.png)  
> ![excel_reader_format2](https://forum-cdn.knime.com/uploads/default/original/3X/0/f/0f6616e712129b39c0d6a9dec4b37f6959f4c610.png)  
> [excel\_reader\_format.knwf](https://forum.knime.com/uploads/short-url/17rCZkBTlkU2gQKuufJoHVueSgY.knwf) (13.4 KB)

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 12, 2022, 10:04pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724/5 "2022-01-12T22:04:07Z")

</div>

@Bleck maybe you could try and use the:

> **[Continental Nodes for KNIME — XLS Formatter Nodes | KNIME](https://www.knime.com/community/continental-nodes-for-knime-xls-formatter)**
>
> The XLS Formatter nodes make it possible to add formatting and advanced settings to .xlsx files.
> 
> For details regarding the individual nodes, please also refer to the node descriptions within KNIME. This documentation page is rather intended as an...

And try to format the number after you have exported it to excel

> **[Excel Formatting – knime](https://hub.knime.com/knime/spaces/Workflow%20Snippets/latest/Excel%20Formatting~Lq4X1-_FKKDtlSTF)**
>
> If you would like to format your Excel File, you can use the Community Extension: Continental Nodes for KNIME With those nodes, you can create a control table.…

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 12, 2022, 10:04pm UTC](https://forum.knime.com/t/problem-with-decimal-point/38724/6 "2022-04-12T22:04:10Z")

</div>

Closed on April 12, 2022, 10:04pm UTC

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