Read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

Overview

Spout

Latest Stable Version Project Status Build Status Scrutinizer Code Quality Code Coverage Total Downloads

Spout is a PHP library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way. Contrary to other file readers or writers, it is capable of processing very large files while keeping the memory usage really low (less than 3MB).

Join the community and come discuss about Spout: Gitter

Documentation

Full documentation can be found at https://opensource.box.com/spout/.

Requirements

  • PHP version 7.2 or higher
  • PHP extension php_zip enabled
  • PHP extension php_xmlreader enabled

Upgrade guide

Version 3 introduced new functionality but also some breaking changes. If you want to upgrade your Spout codebase from version 2 please consult the Upgrade guide.

Running tests

The master branch includes unit, functional and performance tests. If you just want to check that everything is working as expected, executing the unit and functional tests is enough.

  • phpunit - runs unit and functional tests
  • phpunit --group perf-tests - only runs the performance tests

For information, the performance tests take about 10 minutes to run (processing 1 million rows files is not a quick thing).

Performance tests status: Build Status

Support

You can ask questions, submit new features ideas or discuss about Spout in the chat room:
Gitter

Copyright and License

Copyright 2017 Box, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Row objects and Cell styling

    Row objects and Cell styling

    This PR introduces a Row object in all writers and implements Cell styling for #182.

    I left the public writer methods

    WriterAbstract::addRow
    WriterAbstract::addRows
    WriterAbstract::addRowWithStyle
    WriterAbstract::addRowsWithStyle
    

    intact - so all the existing tests can pass. However the signatured changed. This can be considered a BC Break. Because the legacy data arrays are transformed into Row objects - it is hacky. When we should drop the support for arrays - it should get better.

    • A Row object holds the cells and styles of a row.
    • From that point on (after the Writer) - all signatures like(array $dataRows, $style) have been refactored to (Row $row).
    • With the newly created Row object the *WithStyle mehods can be marked as @deprecated or can be deleted.
    • This also made managing the row style in the Writer superfluous.
    • I added a WriterAbstract::withRow method that accepts a closure.
    • Registering the styles is now done right before a Cell is written to the output.
    • The default style is merged into the row style - and the row style is merged into the cell style.
    • The tests pass - more can follow when we agree that this is the "right" way to proceed.

    Example:

    use Box\Spout\Common\Type;
    use Box\Spout\Writer\Common\Creator\Style\BorderBuilder;
    use Box\Spout\Writer\Common\Creator\Style\StyleBuilder;
    use Box\Spout\Writer\Common\Entity\Cell;
    use Box\Spout\Writer\Common\Entity\Row;
    use Box\Spout\Writer\Common\Entity\Style\Color;
    use Box\Spout\Writer\WriterFactory;
    
    
    $defaultStyleBorderBottom = (new StyleBuilder())
        ->setBorder((new BorderBuilder())->setBorderBottom()->build())
        ->build();
    
    $rowStyleItalicBold = (new StyleBuilder())
        ->setFontItalic()
        ->setFontBold()
        ->build();
    
    $greenLight = (new StyleBuilder())
        ->setBackgroundColor(Color::GREEN)
        ->build();
    
    $yellowLight = (new StyleBuilder())
        ->setBackgroundColor(Color::YELLOW)
        ->build();
    
    $redLight = (new StyleBuilder())
        ->setBackgroundColor(Color::RED)
        ->build();
    
    /** @var \Box\Spout\Writer\XLSX\Writer $writer */
    $writer = WriterFactory::create(Type::XLSX);
    $writer->setDefaultRowStyle($defaultStyleBorderBottom);
    $writer->openToFile(__DIR__ . '/test.xlsx');
    
    $row = new Row();
    $row
        ->addCell(new Cell('G', $greenLight))
        ->addCell(new Cell('Y', $yellowLight))
        ->addCell(new Cell('R', $redLight))
        ->setStyle($rowStyleItalicBold);
    
    $writer->addRow($row);
    
    $writer->close();
    

    This yields:

    screen

    or:

    
    $writer->withRow(function(Row $row) use ($greenLight, $yellowLight, $redLight, $rowStyleItalicBold) {
        return $row
            ->addCell(new Cell('G', $greenLight))
            ->addCell(new Cell('Y', $yellowLight))
            ->addCell(new Cell('R', $redLight))
            ->setStyle($rowStyleItalicBold);
    });
    
    opened by madflow 34
  • XLSX Reader error when run

    XLSX Reader error when run

    hello, i get an error when try to read xlsx. i try the code to read xlsx like in basic example but i get this error

    Warning: XMLReader::open(zip://Test/pegawaibaru.XLSX#xl/sharedStrings.xml): failed to open stream: operation failed in C:\xampp\htdocs\web pln\libs\Spout\Reader\XLSX\Helper\SharedStringsHelper.php on line 86

    Warning: XMLReader::open(): Unable to open source data in C:\xampp\htdocs\web pln\libs\Spout\Reader\XLSX\Helper\SharedStringsHelper.php on line 86

    Fatal error: Uncaught exception 'Box\Spout\Common\Exception\IOException' with message 'Could not open Test/pegawaibaru.XLSX for reading! (Could not open "xl/sharedStrings.xml".)' in C:\xampp\htdocs\web pln\libs\Spout\Reader\AbstractReader.php:105 Stack trace: #0 C:\xampp\htdocs\web pln\atesting.php(64): Box\Spout\Reader\AbstractReader->open('Test/pegawaibar...') #1 {main} thrown in C:\xampp\htdocs\web pln\libs\Spout\Reader\AbstractReader.php on line 105

    i use spout version 2.5.0 and php version 5.6.3 when i replace spout with version 2.4.4 it works, it takes 235 sec to read 7323 rows and 46 col. what should i do to fix it version 2.5.0?

    bug waiting for answer 
    opened by Dwikarya 34
  • Excel claiming the xlsx file is corrupt.

    Excel claiming the xlsx file is corrupt.

    I just updated my php to 5.6.25 and my Excel to 15.0.4849.1003 and now my spout box generate xlsx files don't open. I keep getting a "We found a problem with some content in 'Filename'. Do you want us to try to recover as much as we can? If you trust the source of this workbook click Yes." popup message... and when I click Yes... I get a "The file is corrupt and cannot be opened" message. Is there anything I can do to enable a trace to help resolve the issue. Or if would you like a copy of the generated file I can provide that.

    Thanks

    bug 
    opened by dipdill 30
  • [v3] Write performance XLSX

    [v3] Write performance XLSX

    When I do some quick manual test, the v3 branch seems a lot slower? Or am I missing something obvious? In a quick test (50.000 rows with 20 columns with 20 char strings), v2 is about 20 secs while v3 is 30 seconds. That is a 50% increase..

    v2:

    $writer = WriterFactory::create(Type::XLSX);
    $writer->openToFile('output/spout2.xlsx');
    $writer->addRows($data);
    $writer->close();
    

    v3:

    $writer = WriterEntityFactory::createWriter(Type::XLSX);
    $writer->openToFile('output/spout3.xlsx');
    foreach ($data as $row) {
        $writer->addRow(WriterEntityFactory::createRowFromArray($row));
    }
    $writer->close();
    

    Probably because you have to create Row objects for each row (which create Cell objects for each key)? So in this testcase 50.000 array_maps creating 1 million objects..

    Edit: Full files here: https://gist.github.com/barryvdh/08576d8b8d7a8d171338737851e7ccf4

    opened by barryvdh 27
  • Get validation error message after opening created .xlsx file

    Get validation error message after opening created .xlsx file

    Hello,

    I just create .xlsx files with this code:

            $writer = WriterFactory::create( Type::XLSX );
    
            $writer->openToBrowser( $filename );
    
            // Headers
            $writer->addRow( array( 'Order #', 'Customer name', 'Total ordered', 'Date' ) );
    
            // Then a foreach
            $writer->addRow( array( (int) 0000, 'Customer name', (float) 23.12, '20-01-2016' ) );
            $writer->close()
    
    

    And thats it. After opening this file in Excel 2013 I get the message that the file is corrupted and needs to be repaired. Also the float 'Total ordered' is not a float in Excel at all.

    How can I prevent the needs to be repaired message of every file?

    Thanks!

    opened by basepack 24
  • Initial commit to support Cell styling and number formats in styles

    Initial commit to support Cell styling and number formats in styles

    Quick fix for issue #205, #182 and #151; Also added a feature being able register the style to the sheet without having to call addRowWithStyle (required to add it to the cell as a single style)

    Edit: I know it's a dirty fix. Will update this to tidy it up and support default format by using constants but would like this to be in the master so it's available to everyone.

    Edit 2: For now its only for XLSX, since I dont have OpenOffice available atm

    opened by Rushleader 20
  • Error: Shared string not found for index

    Error: Shared string not found for index

    While reading excel sheet we are having a weird issue. We get the excel file from the external system. It runs fine if run unedited but throws following exception when we edit and save the same file. Even if we just add extra space or delete a sheet, the file throws the same exception.

    Shared string not found for index: 1432

    0 /opt/lampp/htdocs/mr/app/Vendor/Box/Spout/Reader/XLSX.php(247): Box\Spout\Reader\Helper\XLSX\SharedStringsHelper->getStringAtIndex(1432)

    1 /opt/lampp/htdocs/mr/app/Vendor/Box/Spout/Reader/AbstractReader.php(131): Box\Spout\Reader\XLSX->read()

    It displays random value which is not even in the current sheet. Note that we tested just by running the sample code provided under "How to read a XLSX file?" in documentation.

    Any idea what may be going wrong?

    opened by ankitpokhrel 19
  • ZipArchive and Windows

    ZipArchive and Windows

    windows wouldnt open paths like:'xl/sharedStrings.xml', for me need to be 'xl\sharedStrings.xml' otherwise it will drop:

    XMLReader::open(zip://...20150506052548.xlsx#xl/sharedStrings.xml): failed to open stream: operation failed in ...\vendor\box\spout\src\Spout\Reader\Helper\XLSX\SharedStringsHelper.php on line 97

    opened by Janokapapa 16
  • As per RFC-4180 regarding CSV,

    As per RFC-4180 regarding CSV, "If double-quotes are used to enclose …

    …fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote".

    So we are changing the calls to fgetcsv and fputcsv on GlobalFunctionsHelper in order to send the Escape Character as a parameter. To be RFC compliant, we always send the same character as the Field Enclosure character.

    opened by garimpeirodouniverso 15
  • For when to read in batches??

    For when to read in batches??

    Hi team!

    Im working with huge files, will be great if we can set a "range" to read xlsx/csv/ods rows and split our processes in batches, I think that in current version is not possible do it? Do you intend to add this improvement in the future? I can pay for it...

    Thanks!!

    opened by davidNieves 14
  • Date/Time formatting

    Date/Time formatting

    Hi, I came across this feature and found out that calling the method with the boolean argument gives opposite result. Meaning: $reader->setShouldFormatDates(false); // Formatting is enabled $reader->setShouldFormatDates(true); // Formatting is disabled

    This misinterpretation is also documented here.

    opened by milan-zelenka 14
  • Doing cell->getValue() on loop stops when the value is a DateTime Object

    Doing cell->getValue() on loop stops when the value is a DateTime Object

    I have an excel file I'm trying to loop through. So far, I'm able to navigate to the worksheet I have to work on. I'm currently trying to loop through the data rows I have, and so far, this works for me:

        foreach ($sheet->getRowIterator() as $row) {
            $cells = $row->getCells();
            foreach ($cells as $cell){
                $cell_value = $cell->getValue();
                echo "Cell Value = $cell_value<br>\n";
            }
        }
    
    

    For the most part, this works a treat because most of the values are strings or numbers.

    However, I've noticed that it doesn't work for date.

    For example, I used print_r on the $cells variable just to double check and here's what I got:

        [4] => Box\Spout\Common\Entity\Cell Object
            (
                [value:protected] => DateTime Object
                    (
                        [date] => 1963-05-13 00:00:00.000000
                        [timezone_type] => 3
                        [timezone] => UTC
                    )
             }
    

    The value is being read properly but as opposed to the other data rows I have, the value is a datetime object and not a string, and this presents an error.

    I saw the setShouldFormatDate property in the documentation. While I'm able to use this with getValue() to get the formatted value in Excel (usually a dd-MMM-yy format like 11 APR 22), I'd like to be able to get this in the yyyy-mm-dd format.

    Is there a way to do this within the library? Or do I just get the formatted value and then use PHP's built in function to convert the formatted date to my desired format?

    Thank you.

    opened by Zeit42 0
  • Is it possible to use wb instead of wb+ fopen mode in openToFile() in AbstractWriter in order to use compress.zlib:// ?

    Is it possible to use wb instead of wb+ fopen mode in openToFile() in AbstractWriter in order to use compress.zlib:// ?

    If I try to write to a compressed CSV file, then I get an exception using the file wrapper compress.zlib://

    I think it has to do with the seekable file mode used here: $this->filePointer = $this->globalFunctionsHelper->fopen($this->outputFilePath, 'wb+');

    Simply removing the + from the file mode seems to solve the problem but I'm not sure if box/spout needs it somewhere for something.

    B.t.w. this is the exception and errors I get when I open a file with a compress.zlib wrapper using the latest v2 release:

    PHP Warning:  fopen(compress.zlib://art.csv.gz): failed to open stream: operation failed in lib/box/spout/src/Spout/Common/Helper/GlobalFunctionsHelper.php on line 25
    PHP Fatal error:  Uncaught Box\Spout\Common\Exception\IOException: File pointer has not be opened in lib/box/spout/src/Spout/Writer/AbstractWriter.php:175
    
    opened by cmanley 5
  • Format date on export XLSX

    Format date on export XLSX

    Hello,

    I am looking for format date cell on export XLSX but i have ### in my cell ( with a good date formatting: filters and cell content are ok, it's just a wrong cell text )

    I generate my cell like this:

    public function formatDate(\DateTime $date)
        {
            $format = $this->localeFormat->getYearMonthDayFormat();
    
            return WriterEntityFactory::createCell(Date::PHPToExcel($date), (new StyleBuilder())->setFormat('dd/mm/YYYY')->build());
        }
    

    I also tried this date format: m/d/yy h:mm and it's didn't working.

    Thanks

    opened by rsereir 0
  • Incorrect type reported when adding an unsupported type to a cell

    Incorrect type reported when adding an unsupported type to a cell

    I'm using version 3.3.0. I experienced this exception and I've seen it reported in another ticket #713 where someone tried to pass an array as value to a cell entity: "Trying to add a value with an unsupported type: NULL"

    The wrong type is reported because

    Box\Spout\Common\Entity->getValue() has this line: return !$this->isError() ? $this->value : null;

    and Box\Spout\Writer\XLSX\Manager->getCellXML() throws the exception doing this: throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . \gettype($cell->getValue()));

    so of course it'll always report NULL as type.

    So perhaps the cell's getValue() should return the actual value even if it is an unsupported type, but everything reading the cell should check isError() first. That's one way. Another way would be to to create another version of getValue() by another name (e.g. getActualValue()) and use that in the exception message.

    That'll save users a lot of confusion.

    opened by cmanley 0
  • Fix incompatible return types for PHP 8.1

    Fix incompatible return types for PHP 8.1

    Some return types have already been added here https://github.com/box/spout/commit/e75f6f73012b81fd5fee6107d0af9e86c458448e to get rid of the deprecated warnings in PHP 8.1. This PR should fix the remaining ones.

    Fixes https://github.com/box/spout/issues/846

    opened by fabacino 1
Releases(v3.3.0)
  • v3.3.0(May 16, 2021)

    Noteworthy changes:

    • [ODS/XLSX] Big performance improvement, mostly related to how Styling is done (thanks @alamirault!)
    • [XLSX] Support for strict OOXML

    Fixes:

    • [ALL] Headers setting now follows RFC6266
    • [ODS/XLSX] Floats are no longer stored as locale dependent
    • [XLSX] Spout now supports inline strings with multiple value nodes
    • [XLSX] Fixed skipped cells that were possibly in the wrong order
    Source code(tar.gz)
    Source code(zip)
  • v3.2.0(Mar 16, 2021)

    Noteworthy changes:

    • [ALL] Support for PHP 7.1 was removed. 7.2 is the oldest version supported now.
    • [ALL] Spout now fully supports PHP 8

    Fixes:

    • [ODS] Improved boolean support
    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(Dec 3, 2019)

    New features:

    • [XLSX] Added support for writing cell formats
    • [XLSX & ODS] Cell alignment

    Fixes:

    • [ALL] Cell indexes not being respected when rendering row
    • [XLSX & ODS] Added support for cells in error when writing
    • [XLSX] Support for missing styles XML file
    • [ODS] Added support for whitespaces inside <text:span>
    Source code(tar.gz)
    Source code(zip)
  • v3.0.1(Jun 6, 2019)

  • v3.0.0(May 24, 2019)

  • v2.7.3(Sep 25, 2017)

    Improvements:

    • Exposed API to get the last active sheet

    Bug fixes:

    • Fixed shared strings XML file using a prefix
    • Fixed shared strings XML Entities auto decode
    Source code(tar.gz)
    Source code(zip)
  • v2.7.2(Mar 28, 2017)

    Improvements:

    • CSV Reader can now read lines of any length and is not limited to 32768 bytes per line
    • It is now possible to create 2 spreadsheets at the same time and have sheets with the same name. Uniqueness is enforced at the workbook level.
    • Improved error message when an invalid sheet name is set
    • Introduced hard limit on the character count for XLSX cells (32,767 characters)

    Bug fixes:

    • Fixed parsing of the XLSX spreadsheet dimensions
    • Fixed reading of ODS sheet names
    • Better support for empty rows in XLSX files
    • Better support for cells with custom inner style/phonetic description in XLSX files
    • Calling close() when a writer is already closed no longer causes an error
    Source code(tar.gz)
    Source code(zip)
  • v2.7.1(Nov 3, 2016)

  • v2.7.0(Oct 19, 2016)

    Major Enhancements:

    • New option to preserve empty rows when reading
    • New option to disable automatic text wrapping
    • ODS Reader now supports num-rows-repeated attribute

    Minor Enhancements:

    • Temporary files are now deleted when an exception is thrown while reading
    • Improve support for custom date formats
    • Empty rows don't get written to file for XLSX Writer

    Refactoring:

    • Added internal ReaderOptions
    • Added XMLProcessor to easily process XML files
    • And more...
    Source code(tar.gz)
    Source code(zip)
  • v2.6.0(Sep 8, 2016)

    New features included in this new version:

    • Added support for background color
    • It is now possible to override the default style for the spreadsheet. This leads to a big perf improvement.
    • Empty cells can now have a custom style applied to them

    Fixes:

    • Fix for borders support in Excel 2013+
    • Cells formatted as dates for XLSX files should respect the shouldFormatDate option
    • Extended support for prefixed XML files
    • A few other minor/perf changes
    Source code(tar.gz)
    Source code(zip)
  • v2.5.0(Jul 11, 2016)

    This new version contains several fixes/improvements:

    • better support for dates:
      • support for cells formatted as time
      • option to return formatted dates instead of PHP objects
    • ODS reader and writer improvements:
      • support for hyperlinks/inline formatting
      • ODS writer now accepts associative arrays (like other writers)
    • Border support!
    • New option to skip BOM addition in CSV file
    • Numerous fixes to not-so-standard XLSX files. Spout now support spreadsheets with:
      • prefixed XML files
      • missing "uniqueCount" and/or "count" attributes in shared strings table
      • missing cell reference in sheet definition
    Source code(tar.gz)
    Source code(zip)
  • v2.4.4(Apr 12, 2016)

    • Consistent behavior among all readers when reading cells with leading/ending spaces.
    • Added protection against closing file handles that were not properly created
    Source code(tar.gz)
    Source code(zip)
  • v2.4.3(Mar 24, 2016)

    • Fixed an issue when writing boolean values to XLSX files - #175
    • Added optional support for custom stream wrappers (only works with CSV) - #176
    • Fixed an issue when reading CSV files which happen to have a EOL delimiter inside an enclosed text - #183
    • Fixed an issue when reading zeros and empty strings from ODS files - #184
    • XLSX and ODS writers did not properly release the file handle - #190
    Source code(tar.gz)
    Source code(zip)
  • v2.4.2(Feb 14, 2016)

  • v2.4.1(Jan 14, 2016)

  • v2.4.0(Dec 21, 2015)

    Multiple optimizations:

    • empty cells are not written, saving space
    • hot functions have been optimized for better performance

    The created files' mime type is now correctly detected. Support for dates beyond 2037.

    Source code(tar.gz)
    Source code(zip)
  • v2.3.2(Nov 5, 2015)

    This release includes a few improvements:

    • Better support for CSV files with very long lines
    • Reading numeric timestamp in XLSX files now returns a proper date
    • Prevention of folder name conflict when 2 folders are created at exactly the same microsecond
    Source code(tar.gz)
    Source code(zip)
  • v2.3.1(Oct 15, 2015)

    This release contains 2 fixes:

    • prevent infinite loop for multi-lines CSV when all lines are empty
    • Resolve "Cannot open file" issue occurring on some Windows platforms
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Sep 4, 2015)

    Spout now supports a new document format: ODS! Through the same interface, it is now possible to read CSV, XLSX and ODS files.

    Other improvements:

    • explicit error when trying to configure the writer after opening it
    • better support for boolean values in XLSX files
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Aug 23, 2015)

    Fixed bug preventing a XLSX file to be read in iOS and Numbers. Added detection of invalid sheet names (which resulted in an error message when the file was opened in Excel) Added font color support

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Aug 14, 2015)

    Spout now supports styling! It also forces Excel to display multi-line strings correctly, wrapping the text in the cell and breaking it as expected.

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Jul 29, 2015)

  • v2.0.0(Jul 28, 2015)

    This version introduces a new way to iterate over the files, moving away from the hasNext() / getNext() method to use PHP iterators and the standard foreach loop. It also unifies the way CSV and XLSX files are read. This change required a major version bump, as it is not backwards compatible.

    Version 2.0.0 also brings a few nice additions:

    • Better error handling when processing XML files
    • CSV reader now supports multiple encodings
    • Scrutinizer-CI replaces Coveralls.io and brings very valuable data
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jul 14, 2015)

  • v1.0.11(Jul 12, 2015)

  • v1.0.10(Jun 3, 2015)

  • v1.0.9(May 29, 2015)

  • v1.0.8(May 13, 2015)

  • v1.0.7(Apr 29, 2015)

  • v1.0.6(Apr 29, 2015)

Simplexcel.php - Easily read / parse / convert / write between Microsoft Excel XML / CSV / TSV / HTML / JSON / etc spreadsheet tabular file formats

Simple Excel Easily parse / convert / write between Microsoft Excel XML / CSV / TSV / HTML / JSON / etc formats For further deatails see the GitHuib P

Faisal Salman 550 Dec 27, 2022
PhpSpreadsheet - a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc

PhpSpreadsheet PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file f

PHPOffice 11.8k Dec 31, 2022
A pure PHP library for reading and writing spreadsheet files

PhpSpreadsheet PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file f

PHPOffice 11.8k Jan 8, 2023
🚀 PHP Extension for creating and reader XLSX files.

Why use xlswriter Please refer to the image below. PHPExcel has been unable to work properly for memory reasons at 40,000 and 100000 points, but it ca

viest 1.9k Jan 4, 2023
CSV files from Eloquent model in seconds - a Laravel package.

LaraCSV A Laravel package to easily generate CSV files from Eloquent model. Basic usage $users = User::get(); // All users $csvExporter = new \Laracsv

Muhammad Usman 604 Dec 16, 2022
CSV data manipulation made easy in PHP

CSV Csv is a simple library to ease CSV parsing, writing and filtering in PHP. The goal of the library is to be powerful while remaining lightweight,

The League of Extraordinary Packages 3k Jan 1, 2023
You can convert any table to CSV/EXCEL file.

Convert MySQL to EXCEL You can convert any table to CSV/EXCEL file by this code. In this repository I've used Link1 and Link2 . Simply edit config.php

Arsalan 1 Dec 25, 2021
🦉 Fast Excel import/export for Laravel

Fast Excel import/export for Laravel, thanks to Spout. See benchmarks below. Quick start Install via composer: composer require rap2hpoutre/fast-excel

Raphaël Huchet 1.7k Jan 8, 2023
A pure PHP library for reading and writing project management files

PHPProject PHPProject is a library written in pure PHP that provides a set of classes to write to different project management file formats, i.e. Micr

PHPOffice 192 Dec 17, 2022
Parse and retrieve data from old format Excel XLS files. MS Excel 97 workbooks PHP reader.

SimpleXLS class 0.9.15 Parse and retrieve data from old Excel .XLS files. MS Excel 97-2003 workbooks PHP reader. PHP BIFF reader. No additional extens

Sergey Shuchkin 160 Jan 6, 2023
Merge Excel Files to single excel file per columns

Merge Excel Files to single excel file per columns

Max Base 3 Apr 26, 2021
A pure PHP library for reading and writing word processing documents

Master: Develop: PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. Th

PHPOffice 6.5k Jan 7, 2023
A pure PHP library for reading and writing presentations documents

Branch Master : Branch Develop : PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation fi

PHPOffice 1.2k Jan 2, 2023
🚀 Supercharged Excel exports and imports in Laravel

Supercharged Excel exports and imports A simple, but elegant Laravel wrapper around PhpSpreadsheet exports and imports. Quickstart · Documentation · V

Maatwebsite 11.2k Jan 4, 2023
Read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

OpenSpout OpenSpout is a community driven fork of box/spout, a PHP library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scal

null 239 Jan 6, 2023
A PHP spreadsheet reader (Excel XLS and XLSX, OpenOffice ODS, and variously separated text files) with a singular goal of getting the data out, efficiently

spreadsheet-reader is a PHP spreadsheet reader that differs from others in that the main goal for it was efficient data extraction that could handle l

Nuovo 666 Dec 24, 2022
Simplexcel.php - Easily read / parse / convert / write between Microsoft Excel XML / CSV / TSV / HTML / JSON / etc spreadsheet tabular file formats

Simple Excel Easily parse / convert / write between Microsoft Excel XML / CSV / TSV / HTML / JSON / etc formats For further deatails see the GitHuib P

Faisal Salman 550 Dec 27, 2022
PhpSpreadsheet - a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc

PhpSpreadsheet PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file f

PHPOffice 11.8k Dec 31, 2022
Read and write CSV files with PHP.

Read and write CSV files with PHP. This package provides a minimalistic wrapper around the excellent league/csv package. The API is heavily inspired b

Ryan Chandler 6 Nov 16, 2022
Magento 2 Module for parsing xlsx, xlsm and csv files from Excel

Magento 2 Spreadsheet Parser Facts Parse XLSX, XLSM and CSV Files from Excel Requirements PHP >= 7.0.* Magento >= 2.1.* Compatibility Magento >= 2.1 U

Stämpfli AG 9 Sep 24, 2020