jwage / easy-csv Goto Github PK
View Code? Open in Web Editor NEWEasyCSV is a simple Object Oriented CSV manipulation library for PHP 7.2+
License: MIT License
EasyCSV is a simple Object Oriented CSV manipulation library for PHP 7.2+
License: MIT License
Detect Mac system and enable the auto_detect_line_endings
. See here: http://php.net/manual/en/function.fgetcsv.php
Hello,
just wanted to know what your thoughts would be on a small PR to strip out BOM at the beginning of a file, as having a BOM in the header key of the first field in the file can lead to very frustrating issues. Is this something you think the library should take care of?
Many people like me forked this project just to add composer.json. Adding to main project would avoid it ๐
I wasn't getting any output because of the mb_strpos call. After installing the mbstring extension it worked.
The 'suggest' here seems like a good option: thephpleague/climate#110
I would like to use it, but since there is no license available, I don't know if I'am allowed to use it.
Could you please add a license to it (preferred LGPL-v3 ;-))?
Kind regards and thanks for the work
Hello,
For some reason it saves an empty line at the end of the document (for example if I write 5 records, there are 6 lines), how to fix it?
Hi Jonathan,
if I use the Reader
descriped in your docs:
$reader = new \EasyCSV\Reader('foo.csv');
there is no way to set the delimiter and enclosure property for the header.
The methods setDelimiter()
and setEnclosure()
from AbstractBase
only affects the lines after the header, because the constructor from Reader
reads the first line with default values from AbstractBase
.
There should be a more sophisticated way to set delimiter and enclosure before parsing the first line.
Best regards,
Patrick
Says "Set of PHP 5.3 classes for reading and writing CSV files." but PHP 5.4 is required for latest version.
I wrote something similiar to this class but relied on SplFileObject.. Is that something you're interested having?
In AbstractBase.php you had the open mode as r+ which seemed to be causing the data to not be written. I adjusted my local copy to a+ and now have been able to get sequential writes.
Please add your latest commits as a new release.
Cursory glance of libs seems like 5.1 should suffice. No?
As title, is it possible to let the Reader
class can parse the CSV strings instead of parsing the CSV
file?
While trying to read a simple csv file from here https://support.spatialkey.com/spatialkey-sample-csv-data/ I get false as the return data.
I have no idea what's the problem, seems like init is being called after getRow
No issue here - just a thank you for a very helpful library. You saved me a bunch of time over the past week.
Allow cells with carriage returns.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.