Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Fast XLSX parser that spares resources

Subscribe to updates I use spreadsheet-parser

Statistics on spreadsheet-parser

Number of watchers on Github 117
Number of open issues 16
Average time to close an issue 5 months
Main language PHP
Average time to merge a PR 1 day
Open pull requests 5+
Closed pull requests 3+
Last commit over 2 years ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 105 KB
Organization / Authorakeneo-labs
Latest Releasev1.2.0
Page Updated
Do you use spreadsheet-parser? Leave a review!
View open issues (16)
View spreadsheet-parser activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating spreadsheet-parser for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Akeneo Spreadsheet Parser

This component is designed to extract data from spreadsheets, while being easy on resources, even for large files.

The current version of the spreadsheet parser works with csv and xlsx files.

Travis Build Status Scrutinizer Code Quality

Installing the package

From your application root:

    $ php composer.phar require --prefer-dist "akeneo-labs/spreadsheet-parser"


To extract data from an XLSX spreadsheet, use the following code:

    use Akeneo\Component\SpreadsheetParser\SpreadsheetParser;

    $workbook = SpreadsheetParser::open('myfile.xlsx');

    $myWorksheetIndex = $workbook->getWorksheetIndex('myworksheet');

    foreach ($workbook->createRowIterator($myWorksheetIndex) as $rowIndex => $values) {
        var_dump($rowIndex, $values);

By using the CSV parser options, you can specify the format of your CSV file :

    use Akeneo\Component\SpreadsheetParser\SpreadsheetParser;

    $workbook = SpreadsheetParser::open('myfile.csv');

    $iterator = $workbook->createRowIterator(
            'encoding'  => 'UTF-8',
            'length'    => null,
            'delimiter' => ',',
            'enclosure' => '"',
            'escape'    => '\\'

    foreach ($workbook->createRowIterator(0) as $rowIndex => $values) {
        var_dump($rowIndex, $values);

Running the tests

To run unit tests, use phpspec:

    $ php bin/phpspec run

To run integration tests, use phpunit:

    $ phpunit
spreadsheet-parser open issues Ask a question     (View All Issues)
  • about 3 years Misprint in
  • over 3 years XLS Support
  • over 3 years Getting the style of a cell
  • about 4 years Returning blank cells?
spreadsheet-parser open pull requests (View All Pulls)
  • Fix cell
  • InlineStr fix
  • Assuming that the first row will always have the maximum number of ro…
  • Enhancement
  • Add support for Symfony 4
spreadsheet-parser questions on Stackoverflow (View All Questions)
  • How to unit test a spreadsheet parser?
  • Spreadsheet Parser in Java/Groovy
spreadsheet-parser list of languages used
spreadsheet-parser latest release notes
v1.2.0 Release 1.2.0

Use maintained versions of the symfony component

v1.1.0 v1.1.0 - CSV support
v1.0.0 v1.0.0
Other projects in PHP