From 46a2c4106adac57cc015e39e253134a65d33bd33 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Mon, 19 Mar 2018 18:19:55 +0900 Subject: [PATCH] Fix recently refactored class name in docs --- docs/topics/calculation-engine.md | 4 ++-- docs/topics/recipes.md | 20 ++++++++++---------- docs/topics/worksheets.md | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/topics/calculation-engine.md b/docs/topics/calculation-engine.md index 334b2d05..1854ac06 100644 --- a/docs/topics/calculation-engine.md +++ b/docs/topics/calculation-engine.md @@ -1046,7 +1046,7 @@ $retVal = $worksheet->getCell('D1')->getCalculatedValue(); ``` php // We're going to be calling the same cell calculation multiple times, // and expecting different return values, so disable calculation cacheing -\PhpOffice\PhpSpreadsheet\Calculation::getInstance()->setCalculationCacheEnabled(FALSE); +\PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->setCalculationCacheEnabled(FALSE); $saveFormat = \PhpOffice\PhpSpreadsheet\Calculation\Functions::getReturnDateType(); @@ -1258,7 +1258,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue(); ``` php // We're going to be calling the same cell calculation multiple times, // and expecting different return values, so disable calculation cacheing -\PhpOffice\PhpSpreadsheet\Calculation::getInstance()->setCalculationCacheEnabled(FALSE); +\PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->setCalculationCacheEnabled(FALSE); $saveFormat = \PhpOffice\PhpSpreadsheet\Calculation\Functions::getReturnDateType(); diff --git a/docs/topics/recipes.md b/docs/topics/recipes.md index a17d57e9..0c6c3139 100644 --- a/docs/topics/recipes.md +++ b/docs/topics/recipes.md @@ -187,7 +187,7 @@ internal English coding. ``` php $formula = $spreadsheet->getActiveSheet()->getCell('B8')->getValue(); -$translatedFormula = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_translateFormulaToLocale($formula); +$translatedFormula = \PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->_translateFormulaToLocale($formula); ``` You can also create a formula using the function names and argument @@ -196,7 +196,7 @@ English before setting the cell value: ``` php $formula = '=ДНЕЙ360(ДАТА(2010;2;5);ДАТА(2010;12;31);ИСТИНА)'; -$internalFormula = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->translateFormulaToEnglish($formula); +$internalFormula = \PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->translateFormulaToEnglish($formula); $spreadsheet->getActiveSheet()->setCellValue('B8',$internalFormula); ``` @@ -461,13 +461,13 @@ To set a print break, use the following code, which sets a row break on row 10. ``` php -$spreadsheet->getActiveSheet()->setBreak( 'A10' , \PhpOffice\PhpSpreadsheet\Worksheet::BREAK_ROW ); +$spreadsheet->getActiveSheet()->setBreak('A10', \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_ROW); ``` The following line of code sets a print break on column D: ``` php -$spreadsheet->getActiveSheet()->setBreak( 'D10' , \PhpOffice\PhpSpreadsheet\Worksheet::BREAK_COLUMN ); +$spreadsheet->getActiveSheet()->setBreak('D10', \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_COLUMN); ``` ### Show/hide gridlines when printing @@ -1297,14 +1297,14 @@ foreach ($spreadsheet->getActiveSheet()->getDrawingCollection() as $drawing) { ## Add rich text to a cell Adding rich text to a cell can be done using -`\PhpOffice\PhpSpreadsheet\RichText` instances. Here''s an example, which +`\PhpOffice\PhpSpreadsheet\RichText\RichText` instances. Here''s an example, which creates the following rich text string: > This invoice is ***payable within thirty days after the end of the > month*** unless specified otherwise on the invoice. ``` php -$richText = new \PhpOffice\PhpSpreadsheet\RichText(); +$richText = new \PhpOffice\PhpSpreadsheet\RichText\RichText(); $richText->createText('This invoice is '); $payable = $richText->createTextRun('payable within thirty days after the end of the month'); $payable->getFont()->setBold(true); @@ -1480,15 +1480,15 @@ Set a worksheet to be **hidden** using this code: ``` php $spreadsheet->getActiveSheet() - ->setSheetState(\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_HIDDEN); + ->setSheetState(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN); ``` Sometimes you may even want the worksheet to be **"very hidden"**. The available sheet states are : -- `\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_VISIBLE` -- `\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_HIDDEN` -- `\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_VERYHIDDEN` +- `\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE` +- `\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN` +- `\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN` In Excel the sheet state "very hidden" can only be set programmatically, e.g. with Visual Basic Macro. It is not possible to make such a sheet diff --git a/docs/topics/worksheets.md b/docs/topics/worksheets.md index f732e6ea..6100d3a3 100644 --- a/docs/topics/worksheets.md +++ b/docs/topics/worksheets.md @@ -80,7 +80,7 @@ whatever you choose) and then insert it into your workbook using the ``` php // Create a new worksheet called "My Data" -$myWorkSheet = new \PhpOffice\PhpSpreadsheet\Worksheet($spreadsheet, 'My Data'); +$myWorkSheet = new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet($spreadsheet, 'My Data'); // Attach the "My Data" worksheet as the first worksheet in the Spreadsheet object $spreadsheet->addSheet($myWorkSheet, 0);