squalou opened a new pull request, #27229: URL: https://github.com/apache/superset/pull/27229
### SUMMARY When exporting to Excel, currently datatypes are not specified, leading to decimal numbers being stored as strings, which may lead to issues when opening the file. Depending on the locale, the issue may not even be visible, Excel managing to convert things. (that's the case in us/en locale). When using another locale (say fr), then numbers, output with '.' as decimal separator and stored as strings won't be usable as numbers in Excel. The idea here is to use the same "datatype guessing" method already existing, and use it to convert dataframe columns types when required before exporting. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF not applicable ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> - Create a Table dashboard with numercical and decimal numbers in it. Ideally add some strings and dates. - Export to Excel - you can then unzip the .xlsx file, and open sheet1.xml in a text editor to check the export - Numbers appear directly in xml cell reference - Strings are not visible directly, instead a `<s>` markup is used containing an id to the string Editing the sheet1.xml file is the safest way to check the issue, due to magical operations softwares like Excel, LibreOffice Calc or others perform when opening files that may hide the issue. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [x] Has associated issue: Fixes #23375 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
