Expand description
Laravel Excel for Laravel Rust: Excel, CSV and ODS exports and imports.
A community port of Laravel Excel
(maatwebsite/excel 4.0.7) by Rivervo. See the README for installation and usage.
Re-exports§
pub use config::CsvExportSettings;pub use config::CsvImportSettings;pub use config::ExcelConfig;pub use excel::Excel;pub use excel::Exportable;pub use excel::ImportFile;pub use excel::Importable;pub use excel::PendingDownload;pub use excel::PendingImport;pub use excel::PendingQueue;pub use excel::PendingQueueImport;pub use excel::PendingRows;pub use excel::PendingStore;pub use excel::Queued;pub use excel::Type;pub use sheets::SheetKey;pub use sheets::Sheets;pub use spreadsheet::Chart;pub use spreadsheet::ChartSeries;pub use spreadsheet::ChartType;pub use spreadsheet::Comment;pub use spreadsheet::Drawing;pub use spreadsheet::Hyperlink;pub use spreadsheet::Spreadsheet;pub use spreadsheet::TextRun;pub use spreadsheet::Worksheet;pub use style::Style;pub use style::number_format;
Modules§
- columns
- Typed columns: Laravel Excel’s
WithColumnsconcern and itsMaatwebsite\Excel\Columns. - concerns
- The concerns: the interfaces in
Maatwebsite\Excel\Concerns, as traits. - config
- Laravel Excel’s configuration:
config/excel.php. - coordinate
- Cell coordinates such as
B3, ranges such asA1:C10, and column letters: PhpSpreadsheet’sCoordinatehelper, which Laravel Excel uses throughout. - events
- Laravel Excel’s events:
Maatwebsite\Excel\Events. - sheets
- The sheets of a
WithMultipleSheetsexport or import. - spreadsheet
- The workbook that an export builds before it’s written: the part of PhpSpreadsheet’s
SpreadsheetandWorksheetthat Laravel Excel and its event listeners use. - style
- Cell styles: the subset of PhpSpreadsheet’s
Style::applyFromArray()that Laravel Excel’sWithStyles,WithDefaultStyles,WithBackgroundColorandWithColumnFormattinguse.
Macros§
- export
- Declares an export’s concerns: implements
Exportfor the type from the concerns it lists, like the interfaces a PHP export implements. - import
- Declares an import’s concerns: implements
Importfor the type from the concerns it lists.
Structs§
- Advanced
Value Binder - PhpSpreadsheet’s
AdvancedValueBinder: on top of the default binder,TRUE/FALSEtext becomes a boolean,10%a fraction with a percentage format,$1,234.56or€ 5a number with a currency format,1/2and1 1/2numbers with a fraction format,14:30and14:30:15times, and dates such as2024-03-05or5 March 2024date serials with a date format. - Default
Value Binder - The default binder:
Maatwebsite\Excel\DefaultValueBinder. - Errors
- Keeps the errors of a
SkipsOnErrorimport: PHP’sSkipsErrorstrait. - Excel
- Laravel Excel’s facade: download, store, queue and import spreadsheets.
- Excel
Fake - A faked
Excel: nothing is written or read, and every call is recorded for assertions. - Excel
Service Provider - Registers Laravel Excel’s configuration, the
Excelfacade’s state, and its queued jobs. - Failure
- A row that failed validation:
Maatwebsite\Excel\Validators\Failure. - Failures
- Keeps the failures of a
SkipsOnFailureimport: PHP’sSkipsFailurestrait. - Heading
RowFormatter - Formats the headings of
WithHeadingRowimports:Maatwebsite\Excel\Imports\HeadingRowFormatter. - Heading
RowImport - Reads the heading row of each sheet, formatted:
Maatwebsite\Excel\HeadingRowImport. - Image
Content - An image read from a file:
Maatwebsite\Excel\ImageContent. - Pending
Download - A download being prepared: await it for the response.
- Pending
Import - An import being prepared: await it to import the file.
- Pending
Queue - A queued export being prepared: await it to dispatch the jobs.
- Pending
Queue Import - A queued import being prepared.
- Pending
Rows - Rows being read: await them for each sheet’s rows.
- Pending
Store - A store being prepared: await it to write the file.
- Queued
Export Job - One step of a queued export.
- Queued
Import Job - One step of a queued import.
- Row
- One row of a sheet: its values under their keys, in column order, and the row’s number in the sheet.
- Sheet
Import - One sheet being imported, or one chunk of it: Laravel Excel’s
Sheetwhile importing. - Sheet
Writer - Writes rows into one sheet: Laravel Excel’s
Sheet, while exporting. - String
Value Binder - A binder that stores every value as text: PhpSpreadsheet’s
StringValueBinder. - Validation
Exception - The rows of an import that failed validation:
Maatwebsite\Excel\Validators\ValidationException.
Enums§
- Excel
Error - An error of Laravel Excel itself. Each variant is one of Laravel Excel’s exceptions, with the same message.
- Import
File - A file to import: a path on a disk or on the local filesystem, or an uploaded file.
- Key
- A row’s key: a heading (with
WithHeadingRow) or a column position starting at 0, like the keys of a PHP array. - Queued
- What queueing an export or import dispatched.
- Type
- A reader or writer type: the
Excel::XLSX,Excel::CSV.. constants. - Value
- The value of a cell.
Traits§
- Export
- An export:
Maatwebsite\Excel\Concerns\Export. - Exportable
Exportable: lets an export download, store, queue and write itself, with defaults for the file name, path, disk and type, like the trait’s$fileName,$filePath.. properties.- Import
- An import:
Maatwebsite\Excel\Concerns\Import. - Importable
Importable: lets an import read a file itself, with defaults for the file path, disk and type, like the trait’s$filePath,$diskand$readerTypeproperties.- Into
Rows - Data that becomes one or more rows of a sheet.
- Value
Binder - Decides the type of each value written to a cell: PhpSpreadsheet’s
IValueBinder.
Functions§
- date_
time_ to_ excel - Converts a date and time to an Excel serial date, for a date cell with a date
number format:
Date::dateTimeToExcel()in PhpSpreadsheet. - excel_
to_ date_ time - Converts an Excel serial date, such as an imported date cell, to a date and time:
Date::excelToDateTimeObject()in PhpSpreadsheet (1900 date system). - slug
Str::slug($value, '_'): transliterated to ASCII, lowercase,@asat, and every run of other characters as one_.
Type Aliases§
- Sheet
Rows - The rows of each sheet, under the sheet’s index or (with
WithMultipleSheets) its key, asExcel::toArray()returns them. Index it by position, as insheets[0].