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

Overview

OpenSpout

Latest Stable Version Build Status Code Coverage Total Downloads

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 scalable way. Unlike other file readers or writers, it is capable of processing very large files, while keeping the memory usage really low (less than 3MB).

Documentation

Documentation can be found at https://openspout.readthedocs.io/en/4.x/

Upgrade from box/spout:v3 to openspout/openspout:v3

  1. Replace box/spout with openspout/openspout in your composer.json
  2. Replace Box\Spout with OpenSpout in your code

Upgrade guide

Version 4 introduced new functionality but also some breaking changes. If you want to upgrade your OpenSpout codebase please consult the Upgrade guide.

Copyright and License

This is a fork of Box's Spout library: https://github.com/box/spout

Code until and directly descending from commit cc42c1d is copyright of Box, Inc. and licensed under the Apache License, Version 2.0:

https://github.com/openspout/openspout/blob/cc42c1d29fc5d29f07caeace99bd29dbb6d7c2f8/LICENSE

Code created, edited and released after the commit mentioned above is copyright of openspout Github organization and licensed under MIT License.

https://github.com/openspout/openspout/blob/main/LICENSE

Comments
  • [XLSX] Add feature to set row height

    [XLSX] Add feature to set row height

    I'm trying to add support for setting row height, but I don't know how to do it.

    I've re-added getter/setter and a property which were removed in a recent commit due to being unused. I've also added a failing test.

    What I don't know is what the syntax in the raw XML output (XLS or ODS) would be for specifying the height of the row, or where this code would need to be.

    The code would check for strlen() of the height property, and then apply the height to the row if height has been set via the setter.

    I recently did a PR for celllVerticalAlignment and explicit setWrapText to false: https://github.com/openspout/openspout/pull/63

    I'm trying to replicate doing something like this equivalent in XLSXWriter:

    if ($lines > 1) { $row_options['height'] = $lines * 12.1; }
    $writer->writeSheetRow('Sheet1', array_values($row), $row_options);
    

    Any help or pointers would be much appreciated. I'd be happy to fully finish this PR and tests if only I knew how!

    opened by jonnott 15
  • Error while opening excel

    Error while opening excel

    Hi, Just noticed this.

    I have loaded the excemple script and just added one row as per script below

    include_once 'vendor/autoload.php';
    
    use OpenSpout\Common\Entity\Cell;
    
    $writer = new \OpenSpout\Writer\XLSX\Writer();
    $writer->openToBrowser('testcarl.xlsx');
    $cells = [
        Cell::fromValue('Carl'),
        Cell::fromValue('is'),
        Cell::fromValue('great!'),
    ];
    
    $writer->close();`
    

    After i download the file, and try opening in excel, following issue arrise: image

    I have tested this on PHP 8.1.3 and 8.1.7 clean php versions Anyone have same issues like this or where do i need to look for changes?

    When i reverted back to the original code from Box Sprout it was working correctlly?

    opened by jansor 14
  • Add setCellVerticalAlignment() & allow setShouldWrapText() to be explicitly set as false

    Add setCellVerticalAlignment() & allow setShouldWrapText() to be explicitly set as false

    Does this fork already do the things in this PR, or is it worth re-targeting the PR at this fork instead? Getting frustrated at the lack of any signs of life from box/spout :)

    https://github.com/box/spout/pull/869

    enhancement 
    opened by jonnott 9
  • XLSX Writer: add Cell Comments support

    XLSX Writer: add Cell Comments support

    As a follow-up to issue #122, I've tried to implement the writing-part of cell comments in this PR. Reading cell comments might be a bit more difficult since you don't want to load them into memory but instead read them streaming, but I am not sure that you can always do that, need to investigate that further.

    Note that this is the first PR for me on this repo and I'm not too familiar with the strict typing from PHP8, so any feedback on code formatting/quality is appreciated and I will modify the PR if needed.

    Some details on the implementation of comments:

    Files

    Comments are split into files per sheet, and each sheet with id X requires 3 files to be created:

    • xl/commentsX.xml
    • drawings/vmlDrawingX.vml
    • xl/worksheets/_rels/sheetX.xml.rels

    The reason for this is that the comments are split into 2 parts: the actual text of the comment (in the XML) and the way the panel is being rendered in Excel (this is the VML drawing). The rels file is required to tell the sheet where to find the drawing.

    Implementation

    First off, the model for a comment with it's related textruns were added in the OpenSpout\Common\Entity\Comment namespace:

    • Comment.php
    • TextRun.php

    For actually writing these to files, I've chosen to create a new CommentsManager.php because that seemed to be the cleanest way to open/close and fill the 2 required files (XML + VML) while streaming the writes. Creating the 'rels' doesn't really belong here, because it is static and doesn't depend on the actual contents of the comments, so I've added that to the FilesystemHelper.

    This way, the number of places the current code is impacted is limited. All in all I'm quite pleased with how little code I had to modify :-)

    Finally, I also updated the markdown documentation with both an example as well as some info on how to style comments.

    enhancement 
    opened by jverelst 7
  • Add PHP 8.2 support

    Add PHP 8.2 support

    Allow php 8.2 and add it to the test matrix. This PR fixes also a deprecation in the custom stream wrapper.

    I'm not sure what causes the other failing tests as I can't reproduce them on my local php 8.2 installation 🤔

    enhancement 
    opened by acrobat 6
  • RowIteratorInterface: add `null` as a valid return type

    RowIteratorInterface: add `null` as a valid return type

    The row buffer can can be null per /** @var null|Row Buffer used to store the current row, while checking if there are more rows to read */ private ?Row $rowBuffer;

    Updated the functions to allow returning null.

    opened by jwhulette 6
  • add isEmpty function to Cell

    add isEmpty function to Cell

    in box\spout, there is a isEmpty function which is very convenient, but in openspout, the only way to test if a cell is empty is to use instanceof EmptyCell, but in order to test if is not I have to write !($cell instanceof EmptyCell) which is not a straight forward.

    So I created this isEmpty function, to test if a cell is null or an empty string.

    I don't know if using the empty function on EmptyCell is appropriate. Please let me know if it's not.

    anyway, thanks for this package.

    question 
    opened by steve3d 5
  • Add reader factory

    Add reader factory

    Hi,

    (sorry by advance for my bad english) I use often a custom reader factory with spout, for simple read case, like import, view,...

    ex:ReaderFactory::createReader(string $file): ReaderInterface

    The factory try guessing $file type with extention and mime type.

    I am willing to post a PR if people are interested.

    documentation 
    opened by atomatis 5
  • Set the SheetIterator index to zero on construct

    Set the SheetIterator index to zero on construct

    Because of the usage of type properties the $currentSheetIndex property must be set to zero by default.

    Otherwise the following exception will be raised when calling the current method. "Typed property OpenSpout\\Reader\\XLSX\\SheetIterator::$currentSheetIndex must not be accessed before initialization"

    enhancement 
    opened by Steart 4
  • Any reason for $row->toArray() to be @internal ?

    Any reason for $row->toArray() to be @internal ?

    Any reason to have ->toArray() as internal function ?

    File in question vendor/openspout/openspout/src/Common/Entity/Row.php line 137

        /**
         * @internal
         *
         * @return list<null|bool|DateInterval|DateTimeInterface|float|int|string> The row values, as array
         */
        public function toArray(): array
        {
            return array_map(static function (Cell $cell): null|bool|string|int|float|DateTimeInterface|DateInterval {
                return $cell->getValue();
            }, $this->cells);
        }
    
    opened by FluffyDiscord 4
  • Specify worksheet (by index) in cells merge

    Specify worksheet (by index) in cells merge

    Currently, if you merge cells on multiple worksheets, all merges will be applied on all worksheets. So tables will look broken in Excel. This is hotfix PR for the problem.

    P.S. Sorry about PR without test case. I have no time for it right now.

    opened by hustlahusky 4
  • Fix for incorrect PHP date format when including \T in xlsx date formats

    Fix for incorrect PHP date format when including \T in xlsx date formats

    With this pull request the date format from XLSX files can support \T. It may be better to account for any and all other potential escaped characters that we want to maintain in the PHP date format, for now this achieves what I needed for an ISO 8601 compatible date format at least.

    opened by harry-ybim 1
  • XLSX date format incorrect when including escaped characters

    XLSX date format incorrect when including escaped characters

    I have an XLSX file with dates formatted: yyyy-mm-dd\Thh:mm:ss

    This is incorrectly converted to a PHP date format: Y-m-dtH:i:s

    The lowercase t should be maintained as an escaped uppercase T, like this: \T

    The code producing this comes from here: https://github.com/openspout/openspout/blob/e236da4d3ba365b6fb35803233a6f938497ca496/src/Reader/XLSX/Helper/DateFormatHelper.php#L82 https://github.com/openspout/openspout/blob/e236da4d3ba365b6fb35803233a6f938497ca496/src/Reader/XLSX/Helper/DateFormatHelper.php#L85

    opened by harry-ybim 1
  • Adding column-widths to XLSX Reader

    Adding column-widths to XLSX Reader

    In this PR, I am adding support for reading the <cols> element that was recently added also to the XLSX Writer. It allows you to read the widths of columns, which I needed because I am trying to generate new XLSX files based on input files and require the column widths to remain the same.

    A bit of example code on how this can be done:

    $reader = new \OpenSpout\Reader\XLSX\Reader();
    $reader->open('input.xlsx');
    
    $options = new \OpenSpout\Writer\XLSX\Options();
    $writer = new \OpenSpout\Writer\XLSX\Writer($options);
    $writer->openToFile('output.xlsx');
    
    foreach ($reader->getSheetIterator() as $sheet) {
      // Rewinding the iterator will read everything up until the first row, the <cols> element is placed before the sheetdata
      $sheet->getRowIterator()->rewind(); 
    
      // Read the column widths and copy them over to the new sheet
      foreach ($sheet->getColumnWidths() as $cw) {
        $options->setColumnWidthForRange($cw->width, $cw->start, $cw->end);
      }
     
      // Copy over all the cells
      foreach ($sheet->getRowIterator() as $row) {
          // do stuff with the row
          $cells = $row->getCells();
          $writer->addRow($row);
      }
    }
    
    $reader->close();
    $writer->close();
    

    To keep the code in sync with the way the columnwidths are written, I've added a new Reader/Common/ColumnWidth class, which is a direct copy of the Writer/Common/ColumnWidth class. Personally I think it would be better to remove this duplication, and move it to a generic class in Common/Entity. But I didn't want to start that refactorment without consultation.

    @Slamdunk if you think combining these two identical classes is better, then I will update my PR with that refactorment.

    opened by jverelst 4
  • Http(s) support for open file

    Http(s) support for open file

    Hello,

    I can't read files transmitted via http(s) protocol. Because file_exists and is_readable don't support http(s) protocol, it gets stuck in validation in the open method. Do you have a solution for this? Removing the validation may not be the right way, developing an alternative validation may be the solution.

    https://github.com/openspout/openspout/blob/cbf753126f43095112a099eff23ba4f0a47245eb/src/Reader/AbstractReader.php#L35-L43

    https://www.php.net/manual/en/wrappers.php

    Error log:

    [2022-12-18 22:28:04] local.ERROR: Could not open https://support.staffbase.com/hc/en-us/article_attachments/360009197031/username.csv for reading! File does not exist. {"exception":"[object]
    [stacktrace]                                                                                                                                                                                   
    #0 /var/www/vendor/spatie/simple-excel/src/SimpleExcelReader.php(309): OpenSpout\\Reader\\AbstractReader->open('https://support...')                                                           
    #1 /var/www/vendor/spatie/simple-excel/src/SimpleExcelReader.php(165): Spatie\\SimpleExcel\\SimpleExcelReader->getSheet()                                                                      
    #2 /var/www/app/Services/API/Partners/Inone/ProductListService.php(240): Spatie\\SimpleExcel\\SimpleExcelReader->getRows()
    
    help wanted 
    opened by ssaaiidd 3
  • may be bug options->FIELD use double\single quotes

    may be bug options->FIELD use double\single quotes

    Dear Dev I use according to the documentation single quotes $options->FIELD_ENCLOSURE='"' and an error appears,

    ValueError: fgetcsv(): Argument #3 ($separator) must be a single character

    but if I use double quotes $options->FIELD_ENCLOSURE="\""; - there is no error

    opened by skvarovski 0
  • $options->setColumnWidth() is one too small in resulting spreadsheet

    $options->setColumnWidth() is one too small in resulting spreadsheet

    Using v4.8.1:

    I was setting column widths: $options->setColumnWidth(17,1); $options->setColumnWidth(4,2); $options->setColumnWidth(119,3);

    the resulting widths in the spreadsheet were 16, 3 and 118 (each short by 1). I 'measured' with =CELL("width", A1)

    bug help wanted 
    opened by bar9 2
Releases(v4.11.1)
  • v4.11.1(Jan 2, 2023)

    What's Changed

    • XLSX Comments: fixing typo for italic tag by @jverelst in https://github.com/openspout/openspout/pull/126

    Full Changelog: https://github.com/openspout/openspout/compare/v4.11.0...v4.11.1

    Source code(tar.gz)
    Source code(zip)
  • v4.11.0(Dec 28, 2022)

    What's Changed

    • XLSX Writer: add Cell Comments support by @jverelst in https://github.com/openspout/openspout/pull/123

    New Contributors

    • @jverelst made their first contribution in https://github.com/openspout/openspout/pull/123

    Full Changelog: https://github.com/openspout/openspout/compare/v4.10.1...v4.11.0

    Source code(tar.gz)
    Source code(zip)
  • v4.10.1(Dec 22, 2022)

    What's Changed

    • Set the SheetIterator index to zero on construct by @Steart in https://github.com/openspout/openspout/pull/121

    New Contributors

    • @Steart made their first contribution in https://github.com/openspout/openspout/pull/121

    Full Changelog: https://github.com/openspout/openspout/compare/v4.10.0...v4.10.1

    Source code(tar.gz)
    Source code(zip)
  • v4.10.0(Dec 17, 2022)

    What's Changed

    • Update docs howto stream directly without reading an excel source file by @johan-hage in https://github.com/openspout/openspout/pull/117
    • Remove @internal annotation from $row->toArray() by @FluffyDiscord in https://github.com/openspout/openspout/pull/119

    New Contributors

    • @johan-hage made their first contribution in https://github.com/openspout/openspout/pull/117
    • @FluffyDiscord made their first contribution in https://github.com/openspout/openspout/pull/119

    Full Changelog: https://github.com/openspout/openspout/compare/v4.9.0...v4.10.0

    Source code(tar.gz)
    Source code(zip)
  • v4.9.0(Dec 13, 2022)

    What's Changed

    • [XLSX] Add feature to set row height by @jonnott in https://github.com/openspout/openspout/pull/77

    New Contributors

    • @jonnott made their first contribution in https://github.com/openspout/openspout/pull/77

    Full Changelog: https://github.com/openspout/openspout/compare/v4.8.1...v4.9.0

    Source code(tar.gz)
    Source code(zip)
  • v4.8.1(Nov 10, 2022)

    What's Changed

    • Docs: Add a note about terminating the output after $writer->close() by @spackmat in https://github.com/openspout/openspout/pull/103
    • [ADD] Reader factory documentation by @atomatis in https://github.com/openspout/openspout/pull/107
    • CSV: support Formula type cells by @Slamdunk in https://github.com/openspout/openspout/pull/112

    New Contributors

    • @spackmat made their first contribution in https://github.com/openspout/openspout/pull/103
    • @atomatis made their first contribution in https://github.com/openspout/openspout/pull/107

    Full Changelog: https://github.com/openspout/openspout/compare/v4.8.0...v4.8.1

    Source code(tar.gz)
    Source code(zip)
  • v4.8.0(Oct 19, 2022)

    What's Changed

    • github-actions(deps): bump codecov/codecov-action from 3.1.0 to 3.1.1 by @dependabot in https://github.com/openspout/openspout/pull/96
    • Add PHP 8.2 support by @acrobat in https://github.com/openspout/openspout/pull/101

    New Contributors

    • @acrobat made their first contribution in https://github.com/openspout/openspout/pull/101

    Full Changelog: https://github.com/openspout/openspout/compare/v4.7.0...v4.8.0

    Source code(tar.gz)
    Source code(zip)
  • v4.7.0(Sep 9, 2022)

    What's Changed

    • Fix the iteration type for RowIteratorInterface by @stof in https://github.com/openspout/openspout/pull/86
    • fix: duplicate xlsx files on Windows by @sutrik in https://github.com/openspout/openspout/pull/87
    • Updated examples for 4.x branch and getValue() method -mgt by @mgtremaine in https://github.com/openspout/openspout/pull/84
    • Add ReaderFactory::createFromFileByMimeType factory method by @tschoonen in https://github.com/openspout/openspout/pull/95

    New Contributors

    • @stof made their first contribution in https://github.com/openspout/openspout/pull/86
    • @sutrik made their first contribution in https://github.com/openspout/openspout/pull/87
    • @mgtremaine made their first contribution in https://github.com/openspout/openspout/pull/84
    • @tschoonen made their first contribution in https://github.com/openspout/openspout/pull/95

    Full Changelog: https://github.com/openspout/openspout/compare/v4.6.2...v4.7.0

    Source code(tar.gz)
    Source code(zip)
  • v4.6.2(Jun 15, 2022)

    What's Changed

    • RowIteratorInterface: add null as a valid return type by @jwhulette in https://github.com/openspout/openspout/pull/83

    New Contributors

    • @jwhulette made their first contribution in https://github.com/openspout/openspout/pull/83

    Full Changelog: https://github.com/openspout/openspout/compare/v4.6.1...v4.6.2

    Source code(tar.gz)
    Source code(zip)
  • v4.6.1(May 23, 2022)

    What's Changed

    • Autofilter: fix XLSX implementation by @bionda740 in https://github.com/openspout/openspout/pull/81

    Full Changelog: https://github.com/openspout/openspout/compare/v4.6.0...v4.6.1

    Source code(tar.gz)
    Source code(zip)
  • v4.6.0(May 12, 2022)

    What's Changed

    • Writer: add AutoFilter capability by @bionda740 in https://github.com/openspout/openspout/pull/78
    • Dep update by @Slamdunk in https://github.com/openspout/openspout/pull/80

    New Contributors

    • @bionda740 made their first contribution in https://github.com/openspout/openspout/pull/78

    Full Changelog: https://github.com/openspout/openspout/compare/v4.5.0...v4.6.0

    Source code(tar.gz)
    Source code(zip)
  • v4.5.0(Apr 28, 2022)

    What's Changed

    • Simplify typed property initialization by @Slamdunk in https://github.com/openspout/openspout/pull/73
    • github-actions(deps): bump codecov/codecov-action from 2.1.0 to 3.0.0 by @dependabot in https://github.com/openspout/openspout/pull/74
    • github-actions(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0 by @dependabot in https://github.com/openspout/openspout/pull/76
    • Specify worksheet (by index) in cells merge by @hustlahusky in https://github.com/openspout/openspout/pull/75

    New Contributors

    • @hustlahusky made their first contribution in https://github.com/openspout/openspout/pull/75

    Full Changelog: https://github.com/openspout/openspout/compare/v4.4.1...v4.5.0

    Source code(tar.gz)
    Source code(zip)
  • v4.4.1(Mar 31, 2022)

    What's Changed

    • ::getWrittenRowCount() fix 0|positive-int return type by @Slamdunk in https://github.com/openspout/openspout/pull/70

    Full Changelog: https://github.com/openspout/openspout/compare/v4.4.0...v4.4.1

    Source code(tar.gz)
    Source code(zip)
  • v4.4.0(Mar 31, 2022)

    What's Changed

    • Multi sheet writer: add written row count getter to Sheet too by @Slamdunk in https://github.com/openspout/openspout/pull/69

    Full Changelog: https://github.com/openspout/openspout/compare/v4.3.0...v4.4.0

    Source code(tar.gz)
    Source code(zip)
  • v4.3.0(Mar 31, 2022)

    What's Changed

    • Writer: add written row count getter by @Slamdunk in https://github.com/openspout/openspout/pull/68

    Full Changelog: https://github.com/openspout/openspout/compare/v4.2.1...v4.3.0

    Source code(tar.gz)
    Source code(zip)
  • v4.2.1(Mar 31, 2022)

    What's Changed

    • Add mutation testing with Infection by @Slamdunk in https://github.com/openspout/openspout/pull/64
    • Move docs to Github only by @Slamdunk in https://github.com/openspout/openspout/pull/65
    • Writer: allow CSV to be a compressed stream by @Slamdunk in https://github.com/openspout/openspout/pull/66
    • Writer: allow CSV to be a compressed stream by @Slamdunk in https://github.com/openspout/openspout/pull/67

    Full Changelog: https://github.com/openspout/openspout/compare/v4.2.0...v4.2.1

    Source code(tar.gz)
    Source code(zip)
  • v3.7.4(Mar 31, 2022)

    What's Changed

    • Writer: allow CSV to be a compressed stream by @Slamdunk in https://github.com/openspout/openspout/pull/66

    Full Changelog: https://github.com/openspout/openspout/compare/v3.7.3...v3.7.4

    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Mar 28, 2022)

    What's Changed

    • github-actions(deps): bump actions/cache from 2 to 3 by @dependabot in https://github.com/openspout/openspout/pull/61
    • Add setCellVerticalAlignment() & allow setShouldWrapText() to be explicitly set as false by @Slamdunk in https://github.com/openspout/openspout/pull/63

    New Contributors

    • @dependabot made their first contribution in https://github.com/openspout/openspout/pull/61

    Full Changelog: https://github.com/openspout/openspout/compare/v4.1.2...v4.2.0

    Source code(tar.gz)
    Source code(zip)
  • v4.1.2(Mar 25, 2022)

    What's Changed

    • Restrict allowed Cell value types to the actual ones by @Slamdunk in https://github.com/openspout/openspout/pull/60

    Full Changelog: https://github.com/openspout/openspout/compare/v4.1.1...v4.1.2

    Source code(tar.gz)
    Source code(zip)
  • v4.1.1(Mar 24, 2022)

    What's Changed

    • XLSX: fix sheet internal basename on custom names by @Slamdunk in https://github.com/openspout/openspout/pull/58

    Full Changelog: https://github.com/openspout/openspout/compare/v4.1.0...v4.1.1

    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Mar 24, 2022)

    What's Changed

    • Writers: add getter for Options by @Slamdunk in https://github.com/openspout/openspout/pull/57

    Full Changelog: https://github.com/openspout/openspout/compare/v4.0.0...v4.1.0

    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(Mar 24, 2022)

    What's Changed

    • Remove custom autoloader, rely on composer's one by @Slamdunk in https://github.com/openspout/openspout/pull/23
    • Delete GlobalFunctionsHelper that just duplicates fs functions by @Slamdunk in https://github.com/openspout/openspout/pull/26
    • Remove factories that don't add logic to new() construct by @Slamdunk in https://github.com/openspout/openspout/pull/27
    • Require PHP >= 8.0, move to native types by @Slamdunk in https://github.com/openspout/openspout/pull/28
    • Add more native types by @Slamdunk in https://github.com/openspout/openspout/pull/29
    • Mark all classes as final by @Slamdunk in https://github.com/openspout/openspout/pull/30
    • PHPStan level 6 by @Slamdunk in https://github.com/openspout/openspout/pull/31
    • PHPStan level 7 by @Slamdunk in https://github.com/openspout/openspout/pull/32
    • PHPStan phpstan-strict-rules by @Slamdunk in https://github.com/openspout/openspout/pull/33
    • Protected to Private wherever possible by @Slamdunk in https://github.com/openspout/openspout/pull/34
    • Refactoring by @Slamdunk in https://github.com/openspout/openspout/pull/35
    • declare(strict_types=1); by @Slamdunk in https://github.com/openspout/openspout/pull/36
    • Move to natural factories throught constructor injection by @Slamdunk in https://github.com/openspout/openspout/pull/37
    • Strive for 100% CC by @Slamdunk in https://github.com/openspout/openspout/pull/38
    • Mark as @internal all classes that don't need to be exposed by @Slamdunk in https://github.com/openspout/openspout/pull/39
    • Uniform Abstract classes notation by @Slamdunk in https://github.com/openspout/openspout/pull/40
    • Date cells: DateTime & DateInterval in dedicated and separated instances by @Slamdunk in https://github.com/openspout/openspout/pull/41
    • Leverage native return types for covariants by @Slamdunk in https://github.com/openspout/openspout/pull/42
    • Add benchmarks to CI by @Slamdunk in https://github.com/openspout/openspout/pull/43
    • Merge 3.7.2 release into main by @Slamdunk in https://github.com/openspout/openspout/pull/48
    • XLSX: write data to temp file to be able to set options after rows has been already written by @Slamdunk in https://github.com/openspout/openspout/pull/45
    • Merge 3.x into 4.x by @Slamdunk in https://github.com/openspout/openspout/pull/51
    • Update docs for 4.x release by @Slamdunk in https://github.com/openspout/openspout/pull/52
    • Move Options to strict typing by @Slamdunk in https://github.com/openspout/openspout/pull/53
    • Document column widths and cell merging by @Slamdunk in https://github.com/openspout/openspout/pull/54
    • Merge 3.x into 4.x by @Slamdunk in https://github.com/openspout/openspout/pull/55
    • Raise Code Coverage by @Slamdunk in https://github.com/openspout/openspout/pull/56

    Full Changelog: https://github.com/openspout/openspout/compare/v3.7.3...v4.0.0

    Source code(tar.gz)
    Source code(zip)
  • v3.7.3(Mar 23, 2022)

    What's Changed

    • Fix DateHelper::toExcel() not handling time properly by @Slamdunk in https://github.com/openspout/openspout/pull/50

    Full Changelog: https://github.com/openspout/openspout/compare/v3.7.2...v3.7.3

    Source code(tar.gz)
    Source code(zip)
  • v3.7.2(Mar 23, 2022)

    What's Changed

    • Fix filename encoding in Content-Disposition header by @Slamdunk in https://github.com/openspout/openspout/pull/46

    Full Changelog: https://github.com/openspout/openspout/compare/v3.7.1...v3.7.2

    Source code(tar.gz)
    Source code(zip)
  • v3.7.1(Mar 14, 2022)

    What's Changed

    • Delete logo.png by @Slamdunk in https://github.com/openspout/openspout/pull/22
    • Add #[\ReturnTypeWillChange] where needed by @Slamdunk in https://github.com/openspout/openspout/pull/25

    Full Changelog: https://github.com/openspout/openspout/compare/v3.7.0...v3.7.1

    Source code(tar.gz)
    Source code(zip)
  • v3.7.0(Mar 10, 2022)

    What's Changed

    • Move to CodeCov, update GA workflow by @Slamdunk in https://github.com/openspout/openspout/pull/14
    • composer.json linting by @Slamdunk in https://github.com/openspout/openspout/pull/15
    • Update .gitattributes by @Slamdunk in https://github.com/openspout/openspout/pull/16
    • Simplify directory tree by @Slamdunk in https://github.com/openspout/openspout/pull/17
    • Follow upstream PHP-CS-Fixer rules by @Slamdunk in https://github.com/openspout/openspout/pull/18
    • PHPStan level 5 by @Slamdunk in https://github.com/openspout/openspout/pull/19
    • Fix CC sent on multiple builds by @Slamdunk in https://github.com/openspout/openspout/pull/20
    • Add support for mergeCells, shrink to fit by @Slamdunk in https://github.com/openspout/openspout/pull/21

    Full Changelog: https://github.com/openspout/openspout/compare/v3.6.0...v3.7.0

    Source code(tar.gz)
    Source code(zip)
  • v3.6.0(Mar 3, 2022)

    What's Changed

    • Move to readthedocs by @Slamdunk in https://github.com/openspout/openspout/pull/9
    • Create mkdocs.yml by @Slamdunk in https://github.com/openspout/openspout/pull/10
    • Update docs references to readthedocs.io by @Slamdunk in https://github.com/openspout/openspout/pull/11
    • Fix test deprecation message by @Slamdunk in https://github.com/openspout/openspout/pull/12
    • Add support for date cells to XLSX writer by @Slamdunk in https://github.com/openspout/openspout/pull/13

    Full Changelog: https://github.com/openspout/openspout/compare/v3.5.0...v3.6.0

    Source code(tar.gz)
    Source code(zip)
  • v3.5.0(Mar 2, 2022)

    Merged long pending box/spout PRs

    What's Changed

    • Not just another custom column widths PR by @Slamdunk in https://github.com/openspout/openspout/pull/4
    • Add Formula support to XLSX by @Slamdunk in https://github.com/openspout/openspout/pull/5
    • Add SheetView support for XLSX writer by @Slamdunk in https://github.com/openspout/openspout/pull/6
    • Add dedicated RowIteratorInterface and SheetIteratorInterface by @Slamdunk in https://github.com/openspout/openspout/pull/7
    • Add support for date cells to ODS writer by @Slamdunk in https://github.com/openspout/openspout/pull/8

    Full Changelog: https://github.com/openspout/openspout/compare/v3.4.0...v3.5.0

    Source code(tar.gz)
    Source code(zip)
  • v3.4.0(Mar 2, 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
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