Download the PHP package odan/excel without Composer

On this page you can find all versions of the php package odan/excel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package excel

odan/excel

Latest Version on Packagist Build Status Code Coverage Scrutinizer Code Quality Total Downloads

Extreme fast in-memory Excel (XLSX) file writer.

Requirements

Features

Limitations

The purpose of this package is to provide a very fast and memory efficient Excel (XLSX) file generator. It is designed for very fast data output, but not for fancy worksheet styles. If you need more layout and color options, you may better use a different package, such as PhpSpreadsheet.

Installation

Usage

Generating only In-Memory Excel file

This data is a pure in-memory stream php://memory (default) that never overflows onto the hard disk, regardless of the amount of written data.

Generating temporary files

The php://temp stream is designed for temporary data storage in memory.

However, if the amount of data written exceeds a certain threshold (usually around 2KB or 8KB, depending on PHP versions and configurations), PHP may automatically switch to using temporary files on disk to store the data. This is done to conserve memory when dealing with large amounts of data.

This kind of stream is suitable for most scenarios where you need temporary in-memory storage, but it should automatically switch to using temporary files on disk to store the excess data when it overflows a certain threshold.

The memory limit of php://temp can be controlled by appending /maxmemory:NN, where NN is the maximum amount of data to keep in memory before using a temporary file, in bytes.

This optional parameter allows setting the memory limit before php://temp starts using a temporary file.

Save file in filesystem

If the file does not exist, it will be created. If it already exists, its content will be truncated (cleared) when you write data to it. Make sure the server has write permissions.

Directly as file stream...

... or with stream_get_contents.

Generating Excel file on hard disk with write permissions

Reading the stream contents as string

Stream directly to the HTTP response

To send an existing stream directly to the HTTP response, you can use the fpassthru function. This function reads from an open file pointer and sends the contents directly to the output buffer.

Here's an example of how to do this:

Stream directly to the PSR-7 HTTP response

To stream a file directly to an PSR-7 HTTP response using the Nyholm PSR-7 package, you may use it as follows:

Change the filename accordingly.

Using the ZipStream-PHP package

When working with very large Excel files, typically over 4 GB, you can use the ZipStream-PHP package to create Excel files in the ZIP64 format, which is designed for handling such large files.

Installation

Next, use the Odan\Excel\Zip64Stream class for creating Excel files that offer improved compatibility and support larger file sizes.

License

The MIT License (MIT). Please see License File for more information.


All versions of excel with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1 || ~8.2
ext-dom Version *
ext-zlib Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package odan/excel contains the following files

Loading the files please wait ....