mirror of
https://github.com/shuchkin/simplexlsxgen.git
synced 2023-08-10 21:12:59 +03:00
Update README.md
This commit is contained in:
parent
b26e0dfc20
commit
8b1cdddee3
@ -34,6 +34,7 @@ or download class [here](https://github.com/shuchkin/simplexlsxgen/blob/master/s
|
||||
|
||||
## Examples
|
||||
Use UTF-8 encoded strings.
|
||||
|
||||
### Data types
|
||||
```php
|
||||
$data = [
|
||||
@ -218,6 +219,12 @@ function array2excel() {
|
||||
</html>
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
* When XLSX file is generated (__toString, saveAs or downloadAs methods), the data matrix of each sheet is traversed by rows and columns using foreach cycles. This implies freedom in the type of indexes used for the data but it also implies paying special attention when using numeric indexes since the array is traversed in the order in which they were defined and not in the numerical order of said indexes.
|
||||
* The helper methods for setting and getting the styles of a range or cell, implies that the data was defined as a 2-dimensional array (matrix) with consecutive 0-based numeric indexes.
|
||||
* If you use download or downloadAs methods, make sure you don't generate output before (not important if you use output buffering) and after you call the method. Pay special attention to whitespaces characters (space, cr/lf, tab) in source files before and after PHP code closing tags. If you inadvertently, or on purpose, generate text output, the resulting XLSX file will be corrupted.
|
||||
|
||||
## Debug
|
||||
```php
|
||||
ini_set('error_reporting', E_ALL );
|
||||
|
Loading…
Reference in New Issue
Block a user