xlnt
xlnt copied to clipboard
How to retrieve the original string when there's a value
I've parsed a document where I have a cell with the value 18,40
. The parser cannot identify the locale, which is OK. value()
returns 18
.
The problem is to_string()
returns 18,
, which is kind of random and loses information. I've already inspected the cell_impl
and can't find the original 18,40
anywhere.
Is there any way to retrieve this original string so I can at least parse it properly by myself? I've invested a lot in this application we don't want to start from scratch just because of this small problem.
Oh.... I tried changing the locale at lots of places, in both LibreOffice and in the application, and nothing works. Even converting the cell to text fails. There must be some metadata making this difficult.
I can help with this, but I'll need to see the XLSX file or XML of the worksheet.
Hi! Thank you for the help.
I tried to replicate a minimal example here: https://gist.github.com/alandefreitas/210419f89c0d22736dad264a046c5f9c
It's been a while so I'm not sure that's exactly the same file with which I had the original problem, but that came from the same source.