Update README
This commit is contained in:
1 parent
5e1cfbfdbd
commit
fd84c6f1c8
1 file changed
+8
-1
@@ -126,7 +126,7 @@ For XLSX files, the number of rows per sheet is limited to 1,048,576 (see [Offic
|
|||||||
|
|
||||||
### Configuring the CSV reader and writer
|
### Configuring the CSV reader and writer
|
||||||
|
|
||||||
It is possible to configure the both the CSV reader and writer to specify the field separator as well as the field enclosure:
|
It is possible to configure both the CSV reader and writer to specify the field separator as well as the field enclosure:
|
||||||
```php
|
```php
|
||||||
use Box\Spout\Reader\ReaderFactory;
|
use Box\Spout\Reader\ReaderFactory;
|
||||||
use Box\Spout\Common\Type;
|
use Box\Spout\Common\Type;
|
||||||
@@ -136,6 +136,13 @@ $reader->setFieldDelimiter('|');
|
|||||||
$reader->setFieldEnclosure('@');
|
$reader->setFieldEnclosure('@');
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Additionally, if you need to read non UTF-8 files, you can specify the encoding of your file this way:
|
||||||
|
```php
|
||||||
|
$reader->setEncoding('UTF-16LE');
|
||||||
|
```
|
||||||
|
|
||||||
|
The writer always generate CSV files encoded in UTF-8, with a BOM.
|
||||||
|
|
||||||
### Configuring the XLSX writer
|
### Configuring the XLSX writer
|
||||||
|
|
||||||
#### Strings storage
|
#### Strings storage
|
||||||
|
|||||||
Reference in new issue
Block a user