Fix recently refactored class name in docs
This commit is contained in:
parent
064052b728
commit
46a2c4106a
|
@ -1046,7 +1046,7 @@ $retVal = $worksheet->getCell('D1')->getCalculatedValue();
|
||||||
``` php
|
``` php
|
||||||
// We're going to be calling the same cell calculation multiple times,
|
// We're going to be calling the same cell calculation multiple times,
|
||||||
// and expecting different return values, so disable calculation cacheing
|
// 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();
|
$saveFormat = \PhpOffice\PhpSpreadsheet\Calculation\Functions::getReturnDateType();
|
||||||
|
|
||||||
|
@ -1258,7 +1258,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
|
||||||
``` php
|
``` php
|
||||||
// We're going to be calling the same cell calculation multiple times,
|
// We're going to be calling the same cell calculation multiple times,
|
||||||
// and expecting different return values, so disable calculation cacheing
|
// 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();
|
$saveFormat = \PhpOffice\PhpSpreadsheet\Calculation\Functions::getReturnDateType();
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ internal English coding.
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
$formula = $spreadsheet->getActiveSheet()->getCell('B8')->getValue();
|
$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
|
You can also create a formula using the function names and argument
|
||||||
|
@ -196,7 +196,7 @@ English before setting the cell value:
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
$formula = '=ДНЕЙ360(ДАТА(2010;2;5);ДАТА(2010;12;31);ИСТИНА)';
|
$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);
|
$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.
|
row 10.
|
||||||
|
|
||||||
``` php
|
``` 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:
|
The following line of code sets a print break on column D:
|
||||||
|
|
||||||
``` php
|
``` 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
|
### Show/hide gridlines when printing
|
||||||
|
@ -1297,14 +1297,14 @@ foreach ($spreadsheet->getActiveSheet()->getDrawingCollection() as $drawing) {
|
||||||
## Add rich text to a cell
|
## Add rich text to a cell
|
||||||
|
|
||||||
Adding rich text to a cell can be done using
|
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:
|
creates the following rich text string:
|
||||||
|
|
||||||
> This invoice is ***payable within thirty days after the end of the
|
> This invoice is ***payable within thirty days after the end of the
|
||||||
> month*** unless specified otherwise on the invoice.
|
> month*** unless specified otherwise on the invoice.
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
$richText = new \PhpOffice\PhpSpreadsheet\RichText();
|
$richText = new \PhpOffice\PhpSpreadsheet\RichText\RichText();
|
||||||
$richText->createText('This invoice is ');
|
$richText->createText('This invoice is ');
|
||||||
$payable = $richText->createTextRun('payable within thirty days after the end of the month');
|
$payable = $richText->createTextRun('payable within thirty days after the end of the month');
|
||||||
$payable->getFont()->setBold(true);
|
$payable->getFont()->setBold(true);
|
||||||
|
@ -1480,15 +1480,15 @@ Set a worksheet to be **hidden** using this code:
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
$spreadsheet->getActiveSheet()
|
$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
|
Sometimes you may even want the worksheet to be **"very hidden"**. The
|
||||||
available sheet states are :
|
available sheet states are :
|
||||||
|
|
||||||
- `\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_VISIBLE`
|
- `\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE`
|
||||||
- `\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_HIDDEN`
|
- `\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN`
|
||||||
- `\PhpOffice\PhpSpreadsheet\Worksheet::SHEETSTATE_VERYHIDDEN`
|
- `\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN`
|
||||||
|
|
||||||
In Excel the sheet state "very hidden" can only be set programmatically,
|
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
|
e.g. with Visual Basic Macro. It is not possible to make such a sheet
|
||||||
|
|
|
@ -80,7 +80,7 @@ whatever you choose) and then insert it into your workbook using the
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
// Create a new worksheet called "My Data"
|
// 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
|
// Attach the "My Data" worksheet as the first worksheet in the Spreadsheet object
|
||||||
$spreadsheet->addSheet($myWorkSheet, 0);
|
$spreadsheet->addSheet($myWorkSheet, 0);
|
||||||
|
|
Loading…
Reference in New Issue