Skip to main content

Crate laravel_excel

Crate laravel_excel 

Source
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::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 WithColumns concern and its Maatwebsite\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 as A1:C10, and column letters: PhpSpreadsheet’s Coordinate helper, which Laravel Excel uses throughout.
events
Laravel Excel’s events: Maatwebsite\Excel\Events.
sheets
The sheets of a WithMultipleSheets export or import.
spreadsheet
The workbook that an export builds before it’s written: the part of PhpSpreadsheet’s Spreadsheet and Worksheet that Laravel Excel and its event listeners use.
style
Cell styles: the subset of PhpSpreadsheet’s Style::applyFromArray() that Laravel Excel’s WithStyles, WithDefaultStyles, WithBackgroundColor and WithColumnFormatting use.

Macros§

export
Declares an export’s concerns: implements Export for the type from the concerns it lists, like the interfaces a PHP export implements.
import
Declares an import’s concerns: implements Import for the type from the concerns it lists.

Structs§

AdvancedValueBinder
PhpSpreadsheet’s AdvancedValueBinder: on top of the default binder, TRUE/FALSE text becomes a boolean, 10% a fraction with a percentage format, $1,234.56 or € 5 a number with a currency format, 1/2 and 1 1/2 numbers with a fraction format, 14:30 and 14:30:15 times, and dates such as 2024-03-05 or 5 March 2024 date serials with a date format.
DefaultValueBinder
The default binder: Maatwebsite\Excel\DefaultValueBinder.
Errors
Keeps the errors of a SkipsOnError import: PHP’s SkipsErrors trait.
Excel
Laravel Excel’s facade: download, store, queue and import spreadsheets.
ExcelFake
A faked Excel: nothing is written or read, and every call is recorded for assertions.
ExcelServiceProvider
Registers Laravel Excel’s configuration, the Excel facade’s state, and its queued jobs.
Failure
A row that failed validation: Maatwebsite\Excel\Validators\Failure.
Failures
Keeps the failures of a SkipsOnFailure import: PHP’s SkipsFailures trait.
HeadingRowFormatter
Formats the headings of WithHeadingRow imports: Maatwebsite\Excel\Imports\HeadingRowFormatter.
HeadingRowImport
Reads the heading row of each sheet, formatted: Maatwebsite\Excel\HeadingRowImport.
ImageContent
An image read from a file: Maatwebsite\Excel\ImageContent.
PendingDownload
A download being prepared: await it for the response.
PendingImport
An import being prepared: await it to import the file.
PendingQueue
A queued export being prepared: await it to dispatch the jobs.
PendingQueueImport
A queued import being prepared.
PendingRows
Rows being read: await them for each sheet’s rows.
PendingStore
A store being prepared: await it to write the file.
QueuedExportJob
One step of a queued export.
QueuedImportJob
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.
SheetImport
One sheet being imported, or one chunk of it: Laravel Excel’s Sheet while importing.
SheetWriter
Writes rows into one sheet: Laravel Excel’s Sheet, while exporting.
StringValueBinder
A binder that stores every value as text: PhpSpreadsheet’s StringValueBinder.
ValidationException
The rows of an import that failed validation: Maatwebsite\Excel\Validators\ValidationException.

Enums§

ExcelError
An error of Laravel Excel itself. Each variant is one of Laravel Excel’s exceptions, with the same message.
ImportFile
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, $disk and $readerType properties.
IntoRows
Data that becomes one or more rows of a sheet.
ValueBinder
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, @ as at, and every run of other characters as one _.

Type Aliases§

SheetRows
The rows of each sheet, under the sheet’s index or (with WithMultipleSheets) its key, as Excel::toArray() returns them. Index it by position, as in sheets[0].