Problems with the xls-Formatter - currency

Hello,

i used the XLS-Formatter.

In my exported Excel-File i got two diffrent currency-formats: One column “Provisons-Basis €” is correct, the second column “Provision €” is wrong. Wrong because the €-Symbol is missing.

Both Columns are formatted as Double:
Double-Formattierung

XLS Cell Formatter-Provisions-Basis

Einstellung für Column “Provision €”
XLS Cell Formatter

Exported excel file
Excel-Tabelle-Ausgabe

I can´t find the mistake in my configurations of the nodes.

Thx in advance

I have been leaning harder on this node, which dramatically simplifies Excel formatting and formula structure.

@USCHUKN1ME

I’ve never used these nodes before, but looking at your images the decimal and thousands separators in your excel workbook and the text formatting string are different (the formatting string uses thousand separators with comma, decimal with period; whereas, your worksheets are period for thousands separator and then comma for decimal).

The first column you have a period in the numbers, which Excel will pick up as currency format, whereas the second column does not, so picks up as a general number.

Don’t know if that is your problem, but it is what I see.

DiaAzul

I think you would have to upload some sample data in an exported workflow. When I encounter things like this kind of thing, it usually requires some troubleshooting.

1 Like

@iCFO ,

Your suggestion will help. But you will also need to change the locale settings for your computer to match the environment of the OP. I’m not sure to what extent KNIME nodes are locale aware and in sync with the host operating system. We’ve always standardised on commas for thousand separators and periods for decimals to avoid problems, but that doesn’t apply to everyone.

1 Like

True, but it could be something more easily found on the KNIME side like character encoding for commas or hidden characters.

1 Like

Hi @DiaAzul,

I think I used the same formatting

#,##0.00 €;[Black]#,##0.00 €

on both XLS Formatter nodes. But in the exported Excel table after the nodes the formatting is different.

I hope I haven’t overlooked anything

Thx in advance

Hi @iCFO ,

thank you for this cool Node.

But the result is the same :confused:

The template file has the correct formatting.
_AB021_ABSCHLUSS-Angepasst_als_KNIME-Template.xlsx (26.0 KB)

@DiaAzul
String-to-number-Input

Doesn’t it look good in my opinion?

Are there any “missing values” in that column? Try replacing missing values with zero (using the missing values node) for the column that is not formatting as currency.

Hi @iCFO ,

no missing values.


I got this error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

error063320_01.xml

Fehler in Datei ‘C:\Users\Username\Documents\KNIME-Projekte\Provisionsabrechnung Firma\Provisionsabrechnung je ADM.xlsx’Reparierte Datensätze: Tabelle von /xl/tables/table1.xml-Part (Tabelle)

The column in question is set to string instead of double. If you can’t convert it to double, then try to remove the commas first with Regex replace. If there are problems converting to double after that, then this could be a character encoding issue.

@iCFO

2022-12-05 11_23_48-Dialog - 4_998 - String To Number (Provision €)

Result
2022-12-05 11_23_21-Provisionsabrechnung je ADM.xlsx  -  Repariert - Excel

Result II - Column “Provisions-Basis €” without “€-Symbol”
P-Ergebnis ohne EURO-Zeichen Provisionsabrechnung je ADM.xlsx  -  Repariert - Excel

Changed the format in the template too “Währung” :slight_smile:
Column Provisions-Basis €  -  Repariert - Excel

But got still this error-message:

Errorlog-3

1 Like

Looks like the output is working now. I am sadly limited to the English language, so I can’t read the error message in the image.

1 Like

@iCFO
Yes it works :+1:

Thank you for your help and the tip too this nice node.

Error-Message:

The file could not be opened by Excel readable content has been repaired or removed.

Repaired records: table from /xl/tables/table1.xml part (table)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

error172360_01.xml

Fehler in Datei ‘C:\Users\User\Documents\KNIME-Projekte\Provisionsabrechnung Firma\Provisionsabrechnung je ADM.xlsx’Reparierte Datensätze: Tabelle von /xl/tables/table1.xml-Part (Tabelle)

@DiaAzul

I found and solved the problem.
I put another String-to-Number node in front of the Excel writer node and converted the Commission € column to double format. After that, the XLS formatter nodes output everything correctly.

Problem-gelöst-String-to-Number-einfügen-vor_Excel-Writer-Node

Thank you for your help!

2 Likes

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