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

Excel Export: Negative values converted to positive #1135

Closed
5 tasks done
ptatoChi opened this issue May 15, 2023 · 4 comments · Fixed by #1142
Closed
5 tasks done

Excel Export: Negative values converted to positive #1135

ptatoChi opened this issue May 15, 2023 · 4 comments · Fixed by #1142
Labels

Comments

@ptatoChi
Copy link

Describe the bug

I've been trying to export a table that contains a fieldtype of number.

This is how it's displayed to the UI table
image

When i tried to export using ExcelExportService, I get this
image

I tried the CSV export, and i got it correctly.
image

Reproduction

Have a dataset that contains negative numbers, and set it to fieldtype.number

export using ExcelExportService

Expectation

No response

Environment Info

Angular 15
angular-slickgrid 5.6.3

Validations

@ghiscoding
Copy link
Owner

ghiscoding commented May 15, 2023

trying out Example 14 which has negative numbers, it works as expected and unless you provide a repro, I can't help much. So as far as I see, it works correctly and there must be some issues with your code.

@ptatoChi
Copy link
Author

I removed the exportWithFormatter from the excel options and it works now.. It's weird. In the UI, it was formatted correctly tho.
This will do for now on my end. Thanks @ghiscoding !

@ghiscoding
Copy link
Owner

I was able to reproduce, will do a bug fix shortly

@ghiscoding ghiscoding reopened this May 19, 2023
ghiscoding added a commit to ghiscoding/slickgrid-universal that referenced this issue May 19, 2023
- fixes an issue identified in Angular-Slickgrid where the negative numbers were seeing negative numbers turned to positive numbers (ref: ghiscoding/Angular-Slickgrid#1135)
- also improve perf of `exportWithFormatterWhenDefined` by analyzing `exportWithFormatter` only once instead of twice
ghiscoding added a commit to ghiscoding/slickgrid-universal that referenced this issue May 19, 2023
- fixes an issue identified in Angular-Slickgrid where the negative numbers were seeing negative numbers turned to positive numbers (ref: ghiscoding/Angular-Slickgrid#1135)
- also improve perf of `exportWithFormatterWhenDefined` by analyzing `exportWithFormatter` only once instead of twice
ghiscoding added a commit that referenced this issue May 20, 2023
…-numbers

fix(export): fix negative number exports to Excel, fixes #1135
@ghiscoding
Copy link
Owner

ghiscoding commented May 20, 2023

fixed in Angular-Slickgrid v5.6.4 and Slickgrid-Universal v2.6.4, you can also test it with the live demo Example 19

Also note this is the last version before the next upcoming Angular-Slickgrid v6 major version
Cheers and thanks for the feedback ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants