akaunting/config/excel.php

185 lines
6.1 KiB
PHP
Raw Normal View History

2017-11-30 11:47:56 +03:00
<?php
2019-11-16 10:21:14 +03:00
return [
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
'exports' => [
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Chunk size
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| When using FromQuery, the query is automatically chunked.
| Here you can specify how big the chunk should be.
2017-11-30 11:47:56 +03:00
|
*/
2019-12-15 20:55:12 +03:00
'chunk_size' => 1000,
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Pre-calculate formulas during export
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
*/
2019-11-16 10:21:14 +03:00
'pre_calculate_formulas' => false,
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| CSV Settings
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| Configure e.g. delimiter, enclosure and line ending for CSV exports.
2017-11-30 11:47:56 +03:00
|
*/
2019-12-15 20:55:12 +03:00
'csv' => [
2019-11-16 10:21:14 +03:00
'delimiter' => ',',
'enclosure' => '"',
'line_ending' => PHP_EOL,
'use_bom' => false,
'include_separator_line' => false,
'excel_compatibility' => false,
2017-11-30 11:47:56 +03:00
],
2019-11-16 10:21:14 +03:00
],
2017-11-30 11:47:56 +03:00
2019-12-15 20:55:12 +03:00
'imports' => [
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
'read_only' => true,
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
'heading_row' => [
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Heading Row Formatter
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| Configure the heading row formatter.
| Available options: none|slug|custom
2017-11-30 11:47:56 +03:00
|
*/
2019-11-16 10:21:14 +03:00
'formatter' => 'slug',
2017-11-30 11:47:56 +03:00
],
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| CSV Settings
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| Configure e.g. delimiter, enclosure and line ending for CSV imports.
2017-11-30 11:47:56 +03:00
|
*/
2019-12-15 20:55:12 +03:00
'csv' => [
2019-11-16 10:21:14 +03:00
'delimiter' => ',',
'enclosure' => '"',
'escape_character' => '\\',
'contiguous' => false,
'input_encoding' => 'UTF-8',
],
],
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
/*
|--------------------------------------------------------------------------
| Extension detector
|--------------------------------------------------------------------------
|
| Configure here which writer type should be used when
| the package needs to guess the correct type
| based on the extension alone.
|
*/
'extension_detector' => [
2019-12-15 20:55:12 +03:00
'xlsx' => 'Xlsx',
'xlsm' => 'Xlsx',
'xltx' => 'Xlsx',
'xltm' => 'Xlsx',
'xls' => 'Xls',
'xlt' => 'Xls',
'ods' => 'Ods',
'ots' => 'Ods',
'slk' => 'Slk',
'xml' => 'Xml',
'gnumeric' => 'Gnumeric',
'htm' => 'Html',
'html' => 'Html',
'csv' => 'Csv',
'tsv' => 'Csv',
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| PDF Extension
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| Configure here which Pdf driver should be used by default.
| Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF
2017-11-30 11:47:56 +03:00
|
*/
2019-12-15 20:55:12 +03:00
'pdf' => 'Dompdf',
2019-11-16 10:21:14 +03:00
],
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
'value_binder' => [
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Default Value Binder
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| PhpSpreadsheet offers a way to hook into the process of a value being
| written to a cell. In there some assumptions are made on how the
| value should be formatted. If you want to change those defaults,
| you can implement your own default value binder.
2017-11-30 11:47:56 +03:00
|
*/
2019-12-15 20:55:12 +03:00
'default' => 'Maatwebsite\Excel\DefaultValueBinder',
2019-11-16 10:21:14 +03:00
],
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
'transactions' => [
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Transaction Handler
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| By default the import is wrapped in a transaction. This is useful
| for when an import may fail and you want to retry it. With the
| transactions, the previous import gets rolled-back.
2017-11-30 11:47:56 +03:00
|
2019-11-16 10:21:14 +03:00
| You can disable the transaction handler by setting this to null.
| Or you can choose a custom made transaction handler here.
2017-11-30 11:47:56 +03:00
|
2019-11-16 10:21:14 +03:00
| Supported handlers: null|db
2017-11-30 11:47:56 +03:00
|
*/
2019-11-16 10:21:14 +03:00
'handler' => 'db',
],
2017-11-30 11:47:56 +03:00
2019-11-16 10:21:14 +03:00
'temporary_files' => [
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Local Temporary Path
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| When exporting and importing files, we use a temporary file, before
| storing reading or downloading. Here you can customize that path.
2017-11-30 11:47:56 +03:00
|
*/
2019-12-15 20:55:12 +03:00
'local_path' => storage_path('app/temp'),
2017-11-30 11:47:56 +03:00
/*
|--------------------------------------------------------------------------
2019-11-16 10:21:14 +03:00
| Remote Temporary Disk
2017-11-30 11:47:56 +03:00
|--------------------------------------------------------------------------
|
2019-11-16 10:21:14 +03:00
| When dealing with a multi server setup with queues in which you
| cannot rely on having a shared local temporary path, you might
| want to store the temporary file on a shared disk. During the
| queue executing, we'll retrieve the temporary file from that
| location instead. When left to null, it will always use
| the local path. This setting only has effect when using
| in conjunction with queued imports and exports.
2017-11-30 11:47:56 +03:00
|
*/
2019-11-16 10:21:14 +03:00
'remote_disk' => null,
2017-11-30 11:47:56 +03:00
],
2019-12-15 20:55:12 +03:00
];