unvell / ReoGrid

Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
https://reogrid.net
MIT License
1.33k stars 394 forks source link

fix(ExcelReader): Reading the Excel 2007 format when CurrentCulture is not English Culture #462

Closed workgroupengineering closed 2 years ago

abstractspoon commented 2 years ago

Hi workgroupengineering

I'm really interested in your work here but am still having problems with currency values.

Under the French (France) locale, saving '75,90 €' to a cell always gets converted to '75,900000' when I reload the document.

Have you experienced this issue too?

ps. This is definitely an issue in ExcelReader.cx because the exported xlsx file displays correctly in Excel.

workgroupengineering commented 2 years ago

Hi, have you tried with this pr? should solve the issue.

abstractspoon commented 2 years ago

Thx for getting back to me. I manually merged your changes into my own modified fork but still had this specific problem.

Looking into it some more, it looks like the export to xlsx doesn't really deal with currencies other that '$'. When I load the exported xlsx into Excel and look at how the cell is formatted it appears as 'Custom' not 'Currency' which would explain why the cell loses its 'type' when that exported xlsx is loaded back into ReoGrid. excelreo

abstractspoon commented 2 years ago

I'll download and build your entire repo to see if that improves things...

[Update] Problem is still there.

workgroupengineering commented 2 years ago

Can you attach a simple excel file with the issue?

abstractspoon commented 2 years ago

Here you go: Example_Files.zip

ps. I'm using the WinForms 'Editor' project for my testing: editorproject

ps. I've also raised a separate issue about this

jingwood commented 2 years ago

@workgroupengineering Hi! Thanks for the pull request! and sorry for late merging.