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

[BUG]Negative values not exported correctly #20

Closed
zhongnansu opened this issue Apr 21, 2021 · 1 comment
Closed

[BUG]Negative values not exported correctly #20

zhongnansu opened this issue Apr 21, 2021 · 1 comment
Assignees
Labels
bug Something isn't working csv
Milestone

Comments

@zhongnansu
Copy link
Member

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


Issue occurred when generating CSV file from a table in Discover. Negative numbers appear in the csv with an extra ' in front of them. This is what it looks like:

Negative value Positive value
'-47 520
'-15 475

For reference, this field is of type number

This issue is submitted by @melvinkokxw
opendistro-for-elasticsearch/kibana-reports#344

@MKCG
Copy link
Contributor

MKCG commented May 5, 2021

The reason seems to be related to how Microsoft Excel handles CSV files : https://github.com/opensearch-project/dashboards-reports/blob/main/dashboards-reports/server/routes/utils/dataReportHelpers.ts#L235

I understand that it is meant to prevent an injection but I don't think that any exported content should be modified for any reason.

@zhongnansu zhongnansu added this to the may-bug-bash milestone May 13, 2021
@zhongnansu zhongnansu self-assigned this May 14, 2021
kavilla pushed a commit to kavilla/dashboards-reports that referenced this issue Jul 12, 2023
…ct#20)

Signed-off-by: Rupal Mahajan <[email protected]>

Signed-off-by: Rupal Mahajan <[email protected]>
(cherry picked from commit 7bb7e2ba2b06787bbacd75db642b5aa817deae98)

Co-authored-by: Rupal Mahajan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working csv
Projects
None yet
Development

No branches or pull requests

3 participants