jwage / Easy Csv
Licence: mit
EasyCSV is a simple Object Oriented CSV manipulation library for PHP 7.2+
Stars: ✭ 253
Labels
Projects that are alternatives of or similar to Easy Csv
Algeria Cities
The list of all Algerian provinces and cities according to the official division in different formats: csv, xlsx, php, json, etc.
Stars: ✭ 232 (-8.3%)
Mutual labels: csv
Pxi
🧚 pxi (pixie) is a small, fast, and magical command-line data processor similar to jq, mlr, and awk.
Stars: ✭ 248 (-1.98%)
Mutual labels: csv
Test Lists
URL testing lists intended for discovering website censorship
Stars: ✭ 236 (-6.72%)
Mutual labels: csv
Octosql
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Stars: ✭ 2,579 (+919.37%)
Mutual labels: csv
Django Data Wizard
🧙⚙️ Import structured data (e.g. Excel, CSV, XML, JSON) into one or more Django models via an interactive web-based wizard
Stars: ✭ 227 (-10.28%)
Mutual labels: csv
Cookbook
Code snippets for various programming languages and libraries
Stars: ✭ 245 (-3.16%)
Mutual labels: csv
Docto
Simple command line utility for converting .doc & .xls files to any supported format such as Text, RTF, CSV or PDF
Stars: ✭ 220 (-13.04%)
Mutual labels: csv
Mapshaper
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
Stars: ✭ 2,813 (+1011.86%)
Mutual labels: csv
Codablecsv
Read and write CSV files row-by-row or through Swift's Codable interface.
Stars: ✭ 214 (-15.42%)
Mutual labels: csv
Vscode Data Preview
Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files
Stars: ✭ 245 (-3.16%)
Mutual labels: csv
Csview
📠 A high performance csv viewer with cjk/emoji support.
Stars: ✭ 208 (-17.79%)
Mutual labels: csv
Semantic Csv
Higher level tools for working with CSV data and files
Stars: ✭ 232 (-8.3%)
Mutual labels: csv
Miller
Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON
Stars: ✭ 4,633 (+1731.23%)
Mutual labels: csv
Csvtomarkdowntable
Simple JavaScript/Node.js CSV to Markdown Table Converter
Stars: ✭ 249 (-1.58%)
Mutual labels: csv
EasyCSV
EasyCSV is a simple Object Oriented CSV manipulation library for PHP 7.2+
Installation
Install via composer:
composer require jwage/easy-csv
Reader
To read CSV files we need to instantiate the EasyCSV reader class:
$reader = new \EasyCSV\Reader('read.csv');
You can iterate over the rows one at a time:
while ($row = $reader->getRow()) {
print_r($row);
}
Or you can get everything all at once:
print_r($reader->getAll());
If you have a file with the header in a different line:
// our headers aren't on the first line
$reader = new \EasyCSV\Reader('read.csv', 'r+', false);
// zero-based index, so this is line 4
$reader->setHeaderLine(3);
Advance to a different line:
$reader->advanceTo(6);
More in the Reader unit test.
Writer
To write CSV files we need to instantiate the EasyCSV writer class:
$writer = new \EasyCSV\Writer('write.csv');
You can write a row by passing a commas separated string:
$writer->writeRow('column1, column2, column3');
Or you can pass an array:
$writer->writeRow(array('column1', 'column2', 'column3'));
You can also write several rows at once:
$writer->writeFromArray(array(
'value1, value2, value3',
array('value1', 'value2', 'value3')
));
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].





