Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(export): Excel export auto-detect number with Formatters.multiple #902

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Feb 14, 2023

  • this PR will now auto-detect numbers even when using Formatters.multiple, it wasn't at all prior to this PR
  • also improve parsing of numbers with formatter options, user might provide formatter options like decimalSeparator: ',' and/or thousandSeparator: ' ' and the Excel export should be able to parse this number even with these formatter options (it wasn't able to parse at all prior to this PR and was previously returning the string as is). It will now parse the number and make it a cell number in Excel but will also add a custom format to show the same way in Excel and the UI
  • also change sanitizeDataExport defaults to true to avoid exporting html tags, most users wouldn't want to see html tags in their exports anyway

image

- this PR will now auto-detect numbers even when using Formatters.multiple, it wasn't at all prior to this PR
- also improve parsing of numbers with formatter options, user might provide formatter options like `decimalSeparator: ','` and/or `thousandSeparator: ' '` and the Excel export should be able to parse this number even with these formatter options (it wasn't able to parse at all prior to this PR and was previously returning the string as is)
@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Merging #902 (900a622) into master (eaf4155) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #902   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          244       244           
  Lines        16567     16596   +29     
  Branches      5895      5907   +12     
=========================================
+ Hits         16567     16596   +29     
Impacted Files Coverage Δ
...ckages/common/src/formatters/formatterUtilities.ts 100.00% <100.00%> (ø)
packages/excel-export/src/excelExport.service.ts 100.00% <100.00%> (ø)
packages/excel-export/src/excelUtils.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ghiscoding ghiscoding merged commit be33a68 into master Feb 14, 2023
@ghiscoding ghiscoding deleted the bugfix/parse-excel-export-number branch February 14, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant