csv export quotation problem

Questionscsv export quotation problem
bazel asked 9 years ago

I set export to csv but some rows from one text column are wrapped with quotations, others are not. I dont need quotations at all. Can I remove somehow?

Thanks

3 Answers
Abu Ghufran answered 9 years ago

This is default behavior of fputcsv() function of php. If you want no quotes you can edit jqgrid_dist.php and replace line:

fputcsv($fp, $value);
to
fputcsv($fp, $value, ",", chr(0));

Reference: http://stackoverflow.com/questions/2489553/forcing-fputcsv-to-use-enclosure-for-all-fields

Aldo answered 3 years ago

Hi,   I need quotations to all the fields… how it\’s possible…   Thanks

Abu Ghufran Staff answered 3 years ago

The default behavior is to have quotes for all fields and values. You can test by exporting from this demo: https://www.gridphp.com/demo/demos/export/export-csv.php

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

15 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?