Workbook extends WriterPart
Table of Contents
- $parentWriter : Xlsx
- Parent Xlsx object.
- __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
Return values
mixed —getParentWriter()
Get parent Xlsx object.
public
getParentWriter() : Xlsx
Return values
Xlsx —writeWorkbook()
Write workbook to XML format.
public
writeWorkbook(Spreadsheet $spreadsheet[, bool $recalcRequired = false ]) : string
Parameters
- $spreadsheet : Spreadsheet
- $recalcRequired : bool = false
-
Indicate whether formulas should be recalculated before writing
Return values
string —XML Output
writeBookViews()
Write BookViews.
private
writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet
Return values
void —writeCalcPr()
Write calcPr.
private
writeCalcPr(XMLWriter $objWriter[, bool $recalcRequired = true ]) : void
Parameters
- $objWriter : XMLWriter
- $recalcRequired : bool = true
-
Indicate whether formulas should be recalculated before writing
Return values
void —writeFileVersion()
Write file version.
private
writeFileVersion(XMLWriter $objWriter) : void
Parameters
- $objWriter : XMLWriter
Return values
void —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)
Return values
void —writeSheets()
Write sheets.
private
writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet
Return values
void —writeWorkbookPr()
Write WorkbookPr.
private
writeWorkbookPr(XMLWriter $objWriter) : void
Parameters
- $objWriter : XMLWriter
Return values
void —writeWorkbookProtection()
Write WorkbookProtection.
private
writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet) : void
Parameters
- $objWriter : XMLWriter
- $spreadsheet : Spreadsheet