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 export flaws #963

Closed
manuchap opened this issue Jul 8, 2014 · 6 comments
Closed

csv export flaws #963

manuchap opened this issue Jul 8, 2014 · 6 comments

Comments

@manuchap
Copy link
Contributor

manuchap commented Jul 8, 2014

I upgraded to 2.5.2 to benefit the "export empty fields" fix (that is empty fields are exported as a pair of quotes).
I noticed that if the empty field is a belongs_to field then nothing is exported, hence resulting in data offset in the csv file.

It also took me a while to figure out how to properly import the csv into excel for mac. Since I'm french (yeah bad luck strikes randomly) I use accented characters. The only way (other than importing/exporting to google docs) is to open the csv file first in sublime and save it with encoding UTF-16 LE with BOM prior to importing it into excel, although this might have to do with my server config...

@manuchap
Copy link
Contributor Author

manuchap commented Jul 8, 2014

While on the subject, line breaks in textareas result in one object per line when the whole textarea should be one object in the csv file imho.

@did did added issue labels Jul 9, 2014
@did
Copy link
Member

did commented Jul 9, 2014

the belongs_to issue is solved by this commit: a104ef2

@did
Copy link
Member

did commented Jul 9, 2014

@Manuite , I don't know about the UTF-18 LE with BOM technic. Will it prevent to read the csv in Sublime Text or in *nix? Perhaps, that's a stupid question but I don't see the implication.

@manuchap
Copy link
Contributor Author

the belongs_to issue is solved by this commit: a104ef2

Thx!

About the UTF-16 issue I guess a few screenies will speak a thousand words.
This is what I get when I import the downloaded csv into excel 2011 for mac:
3fe620ea-0804-11e4-9bb3-f532c6ea3fa1

This is what it should look like, after using the technique mentioned above:
5efbf0cc-0804-11e4-87e2-2b26113819bf

This is not a biggie and might just be my server config causing this, not sure. I just thought I'd mention it for someone else who'd bump into this exception.

@manuchap
Copy link
Contributor Author

manuchap commented Aug 4, 2014

Still on the subject.
Phone numbers staring with a zero are truncated when in a string field.
More precisely, a phone number written in the form 0150607080 is exported as 150607080 but when written in the form 01 50 60 70 80 (with spaces) it is exported as is.
Should I use a number field instead?
Btw a phone field would solve this by using the international notation.
to_self: I must find some time to learn ruby and do more prs

@did
Copy link
Member

did commented Oct 20, 2015

@manuchap I don't have the problem in v3 with the phone numbers. They get exported correctly.

@did did closed this as completed Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants