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.

Differences Between: [Versions 310 and 400] [Versions 39 and 400]

(no description)

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

Defines 1 class


Class: WorksheetManager  - X-Ref

Class WorksheetManager
XLSX worksheet manager, providing the interfaces to work with XLSX worksheets.

__construct(OptionsManagerInterface $optionsManager,RowManager $rowManager,StyleManager $styleManager,StyleMerger $styleMerger,SharedStringsManager $sharedStringsManager,XLSXEscaper $stringsEscaper,StringHelper $stringHelper,InternalEntityFactory $entityFactory)   X-Ref
WorksheetManager constructor.

param: OptionsManagerInterface $optionsManager
param: RowManager $rowManager
param: StyleManager $styleManager
param: StyleMerger $styleMerger
param: SharedStringsManager $sharedStringsManager
param: XLSXEscaper $stringsEscaper
param: StringHelper $stringHelper
param: InternalEntityFactory $entityFactory

getSharedStringsManager()   X-Ref

return: SharedStringsManager

startSheet(Worksheet $worksheet)   X-Ref
{@inheritdoc}


throwIfSheetFilePointerIsNotAvailable($sheetFilePointer)   X-Ref
Checks if the sheet has been sucessfully created. Throws an exception if not.

return: void
param: bool|resource $sheetFilePointer Pointer to the sheet data file or FALSE if unable to open the file

addRow(Worksheet $worksheet, Row $row)   X-Ref
{@inheritdoc}


addNonEmptyRow(Worksheet $worksheet, Row $row)   X-Ref
Adds non empty row to the worksheet.

return: void
param: Worksheet $worksheet The worksheet to add the row to
param: Row $row The row to be written

applyStyleAndRegister(Cell $cell, Style $rowStyle)   X-Ref
Applies styles to the given style, merging the cell's style with its row's style

return: RegisteredStyle
param: Cell  $cell
param: Style $rowStyle

getCellXML($rowIndexOneBased, $columnIndexZeroBased, Cell $cell, $styleId)   X-Ref
Builds and returns xml for a single cell.

return: string
param: int  $rowIndexOneBased
param: int  $columnIndexZeroBased
param: Cell $cell
param: int  $styleId

getCellXMLFragmentForNonEmptyString($cellValue)   X-Ref
Returns the XML fragment for a cell containing a non empty string

return: string The XML fragment representing the cell
param: string $cellValue The cell value

close(Worksheet $worksheet)   X-Ref
{@inheritdoc}