Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Spreadsheet::ReadSXC and localization -- Google Sheets vs LibreOffice Calc

by holli (Abbot)
on Jan 12, 2020 at 02:31 UTC ( #11111336=note: print w/replies, xml ) Need Help??


in reply to Spreadsheet::ReadSXC and localization -- Google Sheets vs LibreOffice Calc

But something wents wrong when I opened one of the downloaded ODS files with LibreOffice, edited some of the values and saved it again before procesing it with my script. The modified ODS file now gives floats with my localization standard
That's not really surprising isn't it? It has already been pointed out by roboticus that the "real value" is in the office:value attribute. What's in text:p is just a representation of it. So if you open a file and save it, then that representation will match whatever LibreOffice is currently set to.

You can change settings like decimal point, thousands separator, currency symbols etc in the LibreOffice options under "Language settings -> Language".


holli

You can lead your users to water, but alas, you cannot drown them.

Replies are listed 'Best First'.
Re^2: Spreadsheet::ReadSXC and localization -- Google Sheets vs LibreOffice Calc
by vitoco (Friar) on Jan 14, 2020 at 00:41 UTC

    What it is surprising is that Google Sheets does not save the file with the current settings as LibreOffice does, if that is the standard. Or it is the opposite? I tried to find this in the ODS file format specs but I couldn't find any reference about it.

    Changing the localization of my LibreOffice setup before saving the document is a workaround I'm not sure to take as normal. Google Sheets is clearly saving a "cannonical" version of the value in "text:p" tag, and Libreoffice is reformating that field at open time, but at save time it keeps the new localizated format there. What I haven't tried is to upload a LibreOffice modified document back to Google Sheets... What should I expect there?

      Let's take a step back.

      - Where are the Google documents coming from? As in, how do they get created? And
      - What do you want to do with them after download? Or, what is your workaround actually for?


      holli

      You can lead your users to water, but alas, you cannot drown them.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11111336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2021-09-17 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?