Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 213 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Workbook:: (8 methods):
  writeWorkbook()
  writeFileVersion()
  writeWorkbookPr()
  writeBookViews()
  writeWorkbookProtection()
  writeCalcPr()
  writeSheets()
  writeSheet()


Class: Workbook  - X-Ref

writeWorkbook(Spreadsheet $spreadsheet, $recalcRequired = false)   X-Ref
Write workbook to XML format.

param: bool $recalcRequired Indicate whether formulas should be recalculated before writing
return: string XML Output

writeFileVersion(XMLWriter $objWriter)   X-Ref
Write file version.


writeWorkbookPr(XMLWriter $objWriter)   X-Ref
Write WorkbookPr.


writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet)   X-Ref
Write BookViews.


writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet)   X-Ref
Write WorkbookProtection.


writeCalcPr(XMLWriter $objWriter, $recalcRequired = true)   X-Ref
Write calcPr.

param: bool $recalcRequired Indicate whether formulas should be recalculated before writing

writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet)   X-Ref
Write sheets.


writeSheet(XMLWriter $objWriter, $worksheetName, $worksheetId = 1, $relId = 1, $sheetState = 'visible')   X-Ref
Write sheet.

param: string $worksheetName Sheet name
param: int $worksheetId Sheet id
param: int $relId Relationship ID
param: string $sheetState Sheet state (visible, hidden, veryHidden)