Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

(no description)

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

Defines 1 class

WorkbookManagerInterface:: (7 methods):
  getWorkbook()
  addNewSheetAndMakeItCurrent()
  getWorksheets()
  getCurrentWorksheet()
  setCurrentSheet()
  addRowToCurrentWorksheet()
  close()


Interface: WorkbookManagerInterface  - X-Ref

Interface WorkbookManagerInterface
workbook manager interface, providing the generic interfaces to work with workbook.

getWorkbook()   X-Ref

return: Workbook

addNewSheetAndMakeItCurrent()   X-Ref
Creates a new sheet in the workbook and make it the current sheet.
The writing will resume where it stopped (i.e. data won't be truncated).

return: Worksheet The created sheet

getWorksheets()   X-Ref

return: Worksheet[] All the workbook's sheets

getCurrentWorksheet()   X-Ref
Returns the current sheet

return: Worksheet The current sheet

setCurrentSheet(Sheet $sheet)   X-Ref
Sets the given sheet as the current one. New data will be written to this sheet.
The writing will resume where it stopped (i.e. data won't be truncated).

param: Sheet $sheet The "external" sheet to set as current
return: void

addRowToCurrentWorksheet(Row $row)   X-Ref
Adds a row to the current sheet.
If shouldCreateNewSheetsAutomatically option is set to true, it will handle pagination
with the creation of new worksheets if one worksheet has reached its maximum capicity.

param: Row $row The row to be added
return: void

close($finalFilePointer)   X-Ref
Closes the workbook and all its associated sheets.
All the necessary files are written to disk and zipped together to create the final file.
All the temporary files are then deleted.

param: resource $finalFilePointer Pointer to the spreadsheet that will be created
return: void