spaghetti/xlsx-parser

Very simple to implement xlsx parser to extract data from spreadsheets

1.2.14 2024-03-18 13:48 UTC

This package is auto-updated.

Last update: 2024-10-19 11:55:10 UTC


README


XLSX Parser

Very simple to implement xlsx parser to extract data from spreadsheets for php 8.1+

What is it?

XLSXParser is blazingly fast xlsx parser for php 8.1+. It is made as a simple tool to get job done. No fancy options of any kind and no need for any extra libraries other than need for zip and xmlreader php extensions.

Test Coverage Scrutinizer Code Quality Build Status

  • Initialize class.
  • Open workbook.
  • Choose worksheet.
  • And iterate through receiving each row as an array.

Installation

The recommended way to install is via Composer:

composer require spaghetti/xlsx-parser

Usage

use Spaghetti\XLSXParser;

$workbook = (new XLSXParser())->open('workbook.xlsx');

foreach ($workbook->getRows($workbook->getIndex('worksheet')) as $key => $values) {
    var_dump($key, $values);
}

Stand With Ukraine