Class \avadim\FastExcelLaravel\Excel

Source: 4.3.0 · 2d73434

On this page

  • __construct() -- Excel constructor
  • create() -- Create new XLSX-file for export
  • open() -- Open an existing workbook (XLSX or legacy XLS) for import
  • openString() -- Open a workbook held in a string for import
  • openStream() -- Open a workbook from an open stream resource for import

__construct()


php
public function __construct(?array $options = [])

Excel constructor

Parameters

  • array|null $options

create()


php
public static function create($sheets, ?array $options = []): ExcelWriter

Create new XLSX-file for export

Parameters

  • array|string|null $sheets
  • array|null $options

open()


php
public static function open(string $file, ?array $options = []): ExcelReader

Open an existing workbook (XLSX or legacy XLS) for import. The format is detected automatically from the file signature, so the file extension does not matter.

Parameters

  • string $file
  • array|null $options

openString()


php
public static function openString(string $content, ?array $options = []): ExcelReader

Open a workbook held in a string (a database blob, an HTTP response body, Storage::get(), …). The content is written to a temporary file and opened like open(), so the format is detected from the bytes and the same options apply. See Reading from a string or a stream.

Parameters

  • string $content
  • array|null $options -- same as open()

openStream()


php
public static function openStream($stream, ?array $options = []): ExcelReader

Open a workbook from an open readable stream resource, e.g. \Storage::disk('s3')->readStream($path). The stream is copied into a temporary file from its current position and opened like open(); it is not closed. See Reading from a string or a stream.

Parameters

  • resource $stream
  • array|null $options -- same as open()

FastExcelLaravel 4.3.0 · Search this library and version.

Loading search…

Could not load search. Please try again.

No results. Try another word or method name.