QXlsx
QXlsx copied to clipboard
Numbers with 4 digits
In our project we try to get numbers(int and float) with 4 optional digits.
We used setNumberFormat with the String "0.####". The result is shown in the picture (Excel using german).

Is there a way to use setNumberFormat to get integers without the comma?
Dear @PMime
Can you show me some code for testing?
With an excel viewer, i have the same problem. With Openoffcie 4.1.7 (german settings) there is no problem.
It seems to be a problem with the system language settings and the decimal separator. If i understand the openxml, there is is no chance to have a solution without a vba macro.
With an excel viewer, i have the same problem. With Openoffcie 4.1.7 (german settings) there is no problem.
It seems to be a problem with the system language settings and the decimal separator. If i understand the openxml, there is is no chance to have a solution without a vba macro.
Dear @GitterRalf
If you have any code that you have tested, please post it.
We will be able to start debugging and help you.
With an excel viewer, i have the same problem. With Openoffcie 4.1.7 (german settings) there is no problem. It seems to be a problem with the system language settings and the decimal separator. If i understand the openxml, there is is no chance to have a solution without a vba macro.
Dear @GitterRalf
If you have any code that you have tested, please post it. We will be able to start debugging and help you.
I simply added "0.####" to numberformat.xlsx:
//Custom number formats
QStringList numFormats;
numFormats
<< "Qt #"
<< "yyyy-mmm-dd"
<< "$ #,##0.00"
<< "[red]0.00"
<< "0.####";
-
In my opinion, it seems to be different depending on local notation, not error.
-
Numeric formatting, In ECMA376
| Picture Item | Description |
|---|---|
| . | Indicates the radix-point position. [Example: In a US-English context, =95.4 # $###.00 displays "$ 95.40. end example] The radix-point character displayed is locale-specific. |
| , | Separates groups of three digits. [Example: In a US-English context, =2456800 # $#,###,### displays "2,456,800". end example] The separator character displayed is locale-specific. |
- And, How about trying something like this: (instead of
0.####)
0.0000