PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.1
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpspreadsheet / docs / topics / settings.md

settings.md in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.7.1, at vendor/phpoffice/phpspreadsheet/docs/topics/settings.md

46 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Configuration Settings
2
3 Once you have included the PhpSpreadsheet files in your script, but
4 before instantiating a `Spreadsheet` object or loading a workbook file,
5 there are a number of configuration options that can be set which will
6 affect the subsequent behaviour of the script.
7
8 ## Cell collection caching
9
10 By default, PhpSpreadsheet holds all cell objects in memory, but
11 you can specify alternatives to reduce memory consumption at the cost of speed.
12 Read more about [](./memory_saving.mdmemory saving](./memory_saving.md](./memory_saving.md).
13
14 To enable cell caching, you must provide your own implementation of cache like so:
15
16 ``` php
17 $cache = new MyCustomPsr16Implementation();
18
19 \PhpOffice\PhpSpreadsheet\Settings::setCache($cache);
20 ```
21
22 ## Language/Locale
23
24 Some localisation elements have been included in PhpSpreadsheet. You can
25 set a locale by changing the settings. To set the locale to Brazilian
26 Portuguese you would use:
27
28 ``` php
29 $locale = 'pt_br';
30 $validLocale = \PhpOffice\PhpSpreadsheet\Settings::setLocale($locale);
31 if (!$validLocale) {
32 echo 'Unable to set locale to ' . $locale . " - reverting to en_us" . PHP_EOL;
33 }
34 ```
35
36 - If Brazilian Portuguese language files aren't available, then Portuguese
37 will be enabled instead
38 - If Portuguese language files aren't available,
39 then the `setLocale()` method will return an error, and American English
40 (en\_us) settings will be used throughout.
41
42 More details of the features available once a locale has been set,
43 including a list of the languages and locales currently supported, can
44 be found in [Locale Settings for
45 Formulae](./recipes.md#locale-settings-for-formulae).
46