CSV library
Standalone CSV capabilities
Streaming CSV and TSV features for dependable data exchange.
The CSV library focuses on single-table delimited text. It provides streaming reads and writes, dialect and encoding controls, header normalization, projection, and spreadsheet-formula injection protection.
- Package
- 1 CSV
- Capabilities
- 9 Documented for this library
- Feature groups
- 4 Package-specific responsibilities
What you will learn
- See which delimited-text capabilities are included.
- Understand the single-table CSV format boundary.
- Choose the relevant reading, writing, or dialect guide.
What this library includes
This page is limited to mnb/mnb-phpexcel-csv. Features from the monolithic package or another individual library are not mixed into this list.
composer require mnb/mnb-phpexcel-csv:^2.0Mnb\PHPExcel\Format\CsvPackage quick start
The example uses the individual-library API documented by this feature page.
<?php
require __DIR__ . '/vendor/autoload.php';
use Mnb\PHPExcel\Format\Csv;
$rows = Csv::read('customers.csv')
->withHeaderRow(1)
->rows();
Csv::write($rows, 'customers.tsv', ['delimiter' => "\t"]);Supported capabilities
Search the capabilities owned by this package and open the matching package-specific guide.
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Forward-only row streaming | Iterate delimited records without loading the entire file into memory. | Large data feeds | Supported | Open guide |
| Header-row normalization | Convert the selected row into stable associative field names. | Imports and APIs | Supported | Open guide |
| Delimiter, enclosure, and escape controls | Read CSV, TSV, and custom dialects explicitly or through detection. | Third-party integrations | Supported | Open guide |
| BOM and encoding handling | Handle common byte-order marks and convert supported source encodings. | Multilingual files | Supported | Open guide |
| Row limits and column projection | Slice records and retain only required fields. | Faster ETL | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| CSV and TSV export | Write arrays or iterables using configurable delimiters, line endings, and quoting. | Data exchange | Supported | Open guide |
| Header output | Emit deterministic field order and optional header rows. | Stable contracts | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Formula-injection protection | Escape text that spreadsheet applications could interpret as a formula. | User-controlled exports | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Iterable-based output | Stream source records directly to a destination file. | Large exports | Supported | Open guide |
No matching feature found in this library.
Feature boundaries
These limits prevent individual-library documentation from being confused with the complete monolithic package.
| Capability | Status | What to use instead |
|---|---|---|
| Multiple worksheets | Not supported: CSV and TSV represent one table per file. | CSV and TSV represent one table per file. |
| Formulas and cached workbook values | Not supported: Delimited text stores displayed text only. | Delimited text stores displayed text only. |
| Styles, images, charts, and protection | Not supported: Use XLSX or XLS when workbook structure or presentation matters. | Use XLSX or XLS when workbook structure or presentation matters. |
Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue