thephpleague / csv

CSV data manipulation made easy in PHP
https://csv.thephpleague.com
MIT License
3.33k stars 333 forks source link

Force Column to be escaped as String whith CSV-writer->insertAll #465

Closed makakken closed 2 years ago

makakken commented 2 years ago

(Fill in the relevant information below to help triage your issue.)

Q A
Version 9.7

Question

I have a sequence 00012345 in my array i append to a csv-file. It's representated inside the csv as Number, not as encapsulated string. so its …,00012345, …

I want it to be …,"00012345",…

So how to force a column to be treated as string? adding quotes manually ends in triple-quotes in the returning string....

Checks before submitting

nyamsprod commented 2 years ago

@makakken did you read the pinned issue https://github.com/thephpleague/csv/issues/292 🤔

Also there is no concept of number in CSV everything id a string or is null