Skip to content

Ability to load files by string or stream #1931

Open
@andrei-dascalu

Description

@andrei-dascalu

This is:

- [ ] a bug report
- [x] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Allow loading by file content or passing a stream and transfer the load responsibility to the user, perhaps as an alternative to the current "by file" loading.

It would be greatly appreciated.

What is the current behavior?

Currently, in order to load an excel/ods spreadsheet, one needs to provide a full path to a local file. This is inconvenient in a number of situations.

For example, when using a filesystem abstraction that works with cloud storage systems (eg: Flysystem), there is no local file. A workaround can be to make a local copy, work with it and then delete it, but this is inconvenient/risky when using containers that have no local persistence and may have limited to no local storage (consider a long-running service in Kubernetes, you may limit per container storage and exceeding that may break the application).

Which versions of PhpSpreadsheet and PHP are affected?

PHPSpreadsheet: 1.17
PHP: 7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions