Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

Enable enclosure to be optional in CSV writing #282

Open
@mvl22

Description

@mvl22

It is useful sometimes when writing CSV files to be able to avoid the "" enclosure if the cell is empty or if the cell content doesn't actually contain the delimiter character.

This can substantially reduce the file size, and increase readability, especially when the CSV file is large.

A previous report on this is at: http://phpexcel.codeplex.com/workitem/17597 :

Currently a line of output might appear like this:

"1","Hello, John","This is Mark",""

With a simple change this could be made optional, i.e.

1,"Hello, John",This is Mark,

which I believe is valid CSV and would be closer to what alot of other CSV writing programs output.

The relevant code is at:
https://github.com/PHPOffice/PHPExcel/blob/develop/Classes/PHPExcel/Writer/CSV.php#L297

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions