mnb/mnb-phpexcel-csv

CSV reader/writer module for MNB PHPExcel.

Maintainers

Package info

github.com/mnagendrababu23/mnb-phpexcel-csv

pkg:composer/mnb/mnb-phpexcel-csv

Transparency log

Statistics

Installs: 6

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-07-29 08:56 UTC

This package is auto-updated.

Last update: 2026-08-03 13:02:01 UTC


README

Independent CSV reader/writer module. Requires only mnb/mnb-phpexcel-core.

composer require mnb/mnb-phpexcel-csv:^2.0
use Mnb\PHPExcel\Format\Csv;

$rows = Csv::read('customers.csv')->withHeaderRow()->toArray();

Csv::write($rows, 'customers-export.csv', [
    'with_header' => true,
    'dialect' => 'excel',
]);

Supports streaming reads, dialect detection/configuration, encoding conversion, BOM handling, projection, and formula-injection policies.

Unified metadata

$quick = Csv::metaInfo('customers.csv', [
    'profile' => 'quick',
]);

$full = Csv::read('customers.csv')->metaInfo([
    'profile' => 'full',
    'max_items' => 1000,
]);

The CSV collector uses the shared metadata schema and reports:

  • file size, filesystem dates, MIME type, and optional SHA-256;
  • detected encoding, BOM, delimiter, enclosure, escape character, and line endings;
  • CSV/TSV variant and mixed line-ending detection;
  • complete or sampled row/cell statistics;
  • minimum, maximum, and modal column counts;
  • ragged and blank rows;
  • header-detection confidence;
  • formula-like cells that may create CSV-injection risk;
  • a synthetic single worksheet for cross-format API consistency.

Workbook-only sections such as document properties, macros, charts, pivots, and protection return not_applicable. CSV has no standard embedded metadata property store, so updateMetaInfo() is intentionally not provided for CSV files.