Update getting-started.md
Fix writer usage example
This commit is contained in:
parent
2716d7eeed
commit
45d18305eb
@ -86,7 +86,9 @@ As with the reader, there is one common interface to write data to a file:
|
|||||||
use Box\Spout\Writer\Common\Creator\WriterEntityFactory;
|
use Box\Spout\Writer\Common\Creator\WriterEntityFactory;
|
||||||
use Box\Spout\Common\Entity\Row;
|
use Box\Spout\Common\Entity\Row;
|
||||||
|
|
||||||
$reader = ReaderEntityFactory::createReaderFromFile('/path/to/file.ext');
|
$writer = WriterEntityFactory::createXLSXWriter();
|
||||||
|
// $writer = WriterEntityFactory::createODSWriter();
|
||||||
|
// $writer = WriterEntityFactory::createCSVWriter();
|
||||||
|
|
||||||
$writer->openToFile($filePath); // write data to a file or to a PHP stream
|
$writer->openToFile($filePath); // write data to a file or to a PHP stream
|
||||||
//$writer->openToBrowser($fileName); // stream data directly to the browser
|
//$writer->openToBrowser($fileName); // stream data directly to the browser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user