Update getting-started.md

Fix writer usage example
This commit is contained in:
Ilya Troy 2019-07-30 22:17:52 +03:00 committed by Adrien Loison
parent 2716d7eeed
commit 2d297e954b

View File

@ -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\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->openToBrowser($fileName); // stream data directly to the browser