Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

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

Defines 1 class


Class: WriterMultiSheetsAbstract  - X-Ref

Class WriterMultiSheetsAbstract

__construct(OptionsManagerInterface $optionsManager,GlobalFunctionsHelper $globalFunctionsHelper,HelperFactory $helperFactory,ManagerFactoryInterface $managerFactory)   X-Ref

param: OptionsManagerInterface $optionsManager
param: GlobalFunctionsHelper $globalFunctionsHelper
param: HelperFactory $helperFactory
param: ManagerFactoryInterface $managerFactory

setShouldCreateNewSheetsAutomatically($shouldCreateNewSheetsAutomatically)   X-Ref
Sets whether new sheets should be automatically created when the max rows limit per sheet is reached.
This must be set before opening the writer.

return: WriterMultiSheetsAbstract
param: bool $shouldCreateNewSheetsAutomatically Whether new sheets should be automatically created when the max rows limit per sheet is reached

openWriter()   X-Ref
{@inheritdoc}


getSheets()   X-Ref
Returns all the workbook's sheets

return: Sheet[] All the workbook's sheets

addNewSheetAndMakeItCurrent()   X-Ref
Creates a new sheet and make it the current sheet. The data will now be written to this sheet.

return: Sheet The created sheet

getCurrentSheet()   X-Ref
Returns the current sheet

return: Sheet The current sheet

setCurrentSheet($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).

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

throwIfWorkbookIsNotAvailable()   X-Ref
Checks if the workbook has been created. Throws an exception if not created yet.

return: void

addRowToWriter(Row $row)   X-Ref
{@inheritdoc}


closeWriter()   X-Ref
{@inheritdoc}