-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Closed
Labels
#bugBug reportBug report
Description
Seen this when exporting to xslx. Some numeric fields ends up as numeric format, some ends as strings. It may depend on column but I did not find a logical pattern.
How to reproduce the bug
- Create a dataset based on a table including some numeric decimal fields
- Create custom metrics in this dataset (for instance CAST(SUM(my_column) AS DECIMAL 9,2))
- Create a table chart based on this dataset, include fields, add the custom metric as aggregate function
- Click on Download / Export to Xlsx
- Open the xlsx : at least the column obtained from the custom metric will be considered as string
- ... some other columns (shown with '#' type in superset UI) sometimes end up as string too
Expected results
Ideally I'd like to have
- numeric data column end up as numeric
- keep date data as dates, not converted to numeric
- be able to set Metric datatype, and have them as numeric in the end
Actual results
some values are string.
Screenshots
result after export
Due to fr locale it's easy to see the numerci fields : they have 'commas' in them. (and string are left aligned)
Environment
(please complete the following information):
- browser type and version: Firefox 110
- superset version:
superset version: 2.1.0-rc2 - python version:
python --version: 3.8.16 - node.js version:
node -v: - any feature flags active: none
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven't found one similar.
Additional context
I tried to play around with EXCEL_EXPORT config according to padans documentation, but there's no solution here.
I extracted sheet.xml from the exported xlsx to double check that some fields are indeed noted as strings ("s"), and some other contain numeric value.
rodmax
Metadata
Metadata
Assignees
Labels
#bugBug reportBug report


