From 45d18305ebf70d04f61a0110b5f0e4b07ab8a477 Mon Sep 17 00:00:00 2001 From: Ilya Troy Date: Tue, 30 Jul 2019 22:17:52 +0300 Subject: [PATCH] Update getting-started.md Fix writer usage example --- docs/_pages/getting-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/_pages/getting-started.md b/docs/_pages/getting-started.md index a9dddb0..39a29f7 100755 --- a/docs/_pages/getting-started.md +++ b/docs/_pages/getting-started.md @@ -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