MNB PHPExcelDeveloper Guide
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

Updated

LevelAll levelsReading time4 minPackagemnb/mnb-phpexcel-csv

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.

Installcomposer require mnb/mnb-phpexcel-csv:^2.0
Primary APIMnb\PHPExcel\Format\Csv
ScopeIndividual libraryFocused dependency and package-local API

Package quick start

The example uses the individual-library API documented by this feature page.

csv-features.php
<?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.

9 of 9 features

Reading5 capabilities
FeatureWhat it doesTypical useSupportGuide
Forward-only row streamingIterate delimited records without loading the entire file into memory.Large data feedsSupportedOpen guide
Header-row normalizationConvert the selected row into stable associative field names.Imports and APIsSupportedOpen guide
Delimiter, enclosure, and escape controlsRead CSV, TSV, and custom dialects explicitly or through detection.Third-party integrationsSupportedOpen guide
BOM and encoding handlingHandle common byte-order marks and convert supported source encodings.Multilingual filesSupportedOpen guide
Row limits and column projectionSlice records and retain only required fields.Faster ETLSupportedOpen guide
Writing2 capabilities
FeatureWhat it doesTypical useSupportGuide
CSV and TSV exportWrite arrays or iterables using configurable delimiters, line endings, and quoting.Data exchangeSupportedOpen guide
Header outputEmit deterministic field order and optional header rows.Stable contractsSupportedOpen guide
Security1 capabilities
FeatureWhat it doesTypical useSupportGuide
Formula-injection protectionEscape text that spreadsheet applications could interpret as a formula.User-controlled exportsSupportedOpen guide
Scale1 capabilities
FeatureWhat it doesTypical useSupportGuide
Iterable-based outputStream source records directly to a destination file.Large exportsSupportedOpen guide

Feature boundaries

These limits prevent individual-library documentation from being confused with the complete monolithic package.

CapabilityStatusWhat to use instead
Multiple worksheetsNot supported: CSV and TSV represent one table per file.CSV and TSV represent one table per file.
Formulas and cached workbook valuesNot supported: Delimited text stores displayed text only.Delimited text stores displayed text only.
Styles, images, charts, and protectionNot supported: Use XLSX or XLS when workbook structure or presentation matters.Use XLSX or XLS when workbook structure or presentation matters.