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

CSV Extract from NeoDash adds quotes and leading white space #363

Open
GQ16 opened this issue Feb 14, 2023 · 12 comments · May be fixed by #1012
Open

CSV Extract from NeoDash adds quotes and leading white space #363

GQ16 opened this issue Feb 14, 2023 · 12 comments · May be fixed by #1012
Assignees
Labels
bug Something isn't working

Comments

@GQ16
Copy link

GQ16 commented Feb 14, 2023

  • NeoDash version: 2.2.3
  • Neo4j Database version: 4.4.9 (Enterprise)

When using the Table Output in NeoDash and allowing for CSV download, the CSV itself formats the results strangely and in a way that is problematic for users who depend on these extracts.

Expected, Ideal behavior:

  • An output just like that of the Neo4j Browser when you run a query that results in a table and click "Export CSV"
    image

  • Which looks like this in Excel (it's perfect, this is what I want NeoDash to do):image

  • NeoDash Table Visual Behavior (Not perfect, but ok):
    image

Actual behavior from "Download CSV" from NeoDash Visual:

  • Adds quotes at beginning and end of all strings after the first column
  • Adds a white space before every column name after the first column

image

@GQ16 GQ16 added the bug Something isn't working label Feb 14, 2023
@JonanOribe
Copy link
Contributor

I'm currently working with the CSV download system on another issue, so I'll check this one out as well.

@nielsdejong
Copy link
Collaborator

Perhaps something additional that can fit in here?

From a user: When you download a table as csv, then the value 5 will be exported as  {“low”:5;“high”:0}

We should make sure to cast the javascript integers to human readable numbers when doing an export as a quick check.

@JonanOribe
Copy link
Contributor

Perhaps something additional that can fit in here?

From a user: When you download a table as csv, then the value 5 will be exported as  {“low”:5;“high”:0}

We should make sure to cast the javascript integers to human readable numbers when doing an export as a quick check.

Ok, I add this one to task list.

@JonanOribe
Copy link
Contributor

JonanOribe commented Feb 28, 2023

Currently, I just PR a solution for the leading spaces problem. @GQ16 what version of Excel are you using? I'm not able to reproduce the problem with the quotes

On database:
image

On Excel:
image

@GQ16
Copy link
Author

GQ16 commented Feb 28, 2023

@JonanOribe It's the latest version of excel I believe which is 2019?

Here is what I see when I export from NeoDash. Still the same issue.
image

@GQ16
Copy link
Author

GQ16 commented Feb 28, 2023

@JonanOribe, I've made a discovery. It appears to me that the leading space in front of all the data in the columns (except for column 1, which doesn't have the leading space issue) is the reason excel keeps the quotes. If you eliminate the leading space, the quotes automatically drop off as expected. (Of course, ignore the missing spaces between the actual string, that was a byproduct of me removing all the spaces)

Here is what happened after I removed the leading spaces using notepad before opening in excel:
image

@NanisTe
Copy link

NanisTe commented Mar 2, 2023

@JonanOribe would you also mind looking at an example which includes a comma in the text columns? This also breaks any csv import because there is no possibilty to change the column separator type during export.

This problem will now especially problamatic since the quotes now disappear and a comma in the text column could be identified as a column separator.

@JonanOribe
Copy link
Contributor

No worries @NanisTe , I will add this one too to the task list

@BennuFire
Copy link
Contributor

Closed with 2.2.4

@GQ16
Copy link
Author

GQ16 commented Apr 25, 2023

I'm still dealing with this issue after the latest update. I have to go into Notepad and do a find and replace on all the commas with a space after ", " and replace them with just commas ","
Once I do that, the file opens in excel without all the additional quotation marks. The leading spaces in front of all the columns other than the first is causing the issue.

@GQ16
Copy link
Author

GQ16 commented May 1, 2023

@nielsdejong @BennuFire @JonanOribe
Here is a quick 1-minute video where I walk through exactly what I'm doing and showing the exact issues.
https://youtu.be/NYhlgIYiNdk

@nielsdejong nielsdejong reopened this Nov 27, 2024
@JonanOribe
Copy link
Contributor

Thanks for the video demo @GQ16 . The issue has been reopened so I'll check it out. Hopefully this time the bug fix will cover all possible scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants