Workbook
extends WriterPart
in package
Table of Contents
Properties
- $parentWriter : Xlsx
- Parent Xlsx object.
Methods
- __construct() : mixed
- Set parent Xlsx object.
- getParentWriter() : Xlsx
- Get parent Xlsx object.
- writeWorkbook() : string
- Write workbook to XML format.
- writeBookViews() : void
- Write BookViews.
- writeCalcPr() : void
- Write calcPr.
- writeFileVersion() : void
- Write file version.
- writeSheet() : void
- Write sheet.
- writeSheets() : void
- Write sheets.
- writeWorkbookPr() : void
- Write WorkbookPr.
- writeWorkbookProtection() : void
- Write WorkbookProtection.
Properties
$parentWriter
Parent Xlsx object.
private
Xlsx
$parentWriter
Methods
__construct()
Set parent Xlsx object.
public
__construct(Xlsx $writer) : mixed
Parameters
- $writer : Xlsx
getParentWriter()
Get parent Xlsx object.
public
getParentWriter() : Xlsx
Return values
XlsxwriteWorkbook()
Write workbook to XML format.
public
writeWorkbook(Spreadsheet $spreadsheet[, bool $preCalculateFormulas = false ]) : string
Parameters
- $spreadsheet : Spreadsheet
- $preCalculateFormulas : bool = false
-
If true, formulas will be calculated before writing
Return values
string —XML Output
writeBookViews()
Write BookViews.
private
writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet
writeCalcPr()
Write calcPr.
private
writeCalcPr(XMLWriter $objWriter[, bool $preCalculateFormulas = true ]) : void
Parameters
- $objWriter : XMLWriter
- $preCalculateFormulas : bool = true
-
If true, formulas will be calculated before writing
writeFileVersion()
Write file version.
private
writeFileVersion(XMLWriter $objWriter) : void
Parameters
- $objWriter : XMLWriter
writeSheet()
Write sheet.
private
writeSheet(XMLWriter $objWriter, string $worksheetName[, int $worksheetId = 1 ][, int $relId = 1 ][, string $sheetState = 'visible' ]) : void
Parameters
- $objWriter : XMLWriter
- $worksheetName : string
-
Sheet name
- $worksheetId : int = 1
-
Sheet id
- $relId : int = 1
-
Relationship ID
- $sheetState : string = 'visible'
-
Sheet state (visible, hidden, veryHidden)
writeSheets()
Write sheets.
private
writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet
writeWorkbookPr()
Write WorkbookPr.
private
writeWorkbookPr(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet
writeWorkbookProtection()
Write WorkbookProtection.
private
writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet