Quote:
Originally Posted by TheMadGuy
@capink: First I had hope... and it looks great in Calibre. A an example: I got one series, numbers 25.000 - 36.000 in Calibre - but after the export I got 25000 - 26000
But that's not the worst: For another series it works sometimes this way sometimes another: Number 1 - 9 are 1.0000 - 9.000 now but 10 - 99 are 10000 - 99000 and then 100 - 141 are 100.00 to 141.00
Sorry to say but this is totally confusing why one formula works on different ways and only partially delivers the results I need. Would you be so kind and explain that to me?
|
First, is period the decimal separator in whatever locale you are in? My guess is 'no', given the screen capture you provided post 4.
If period is the decimal separator:
- If you are seeing 1.0000 and 25.000 in calibre then you didn't use the template @capink gave you ({series_index:0>6.2f}). That template generates a number with leading zeros and 2 digits after the decimal point, e.g., 001.00 and 025.00. What template did you use?
- What values are in the CSV file? Are they the same as you are seeing in LibreOffice?
- You should be able to change the column type in LibreOffice to number, avoiding the entire problem. I am not a LibreOffice user so I can't tell you how to do that. LibreOffice should use locales so it won't recognise numbers with the wrong decimal separator.
If your decimal separator is, for example, a comma then try the template
Code:
{#series_index:'re(format_number($, '07.2f'), '\.' , ',')'}