Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

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

Defines 1 class


Class: Sheet  - X-Ref

External representation of a worksheet.

__construct(int $sheetIndex, string $associatedWorkbookId, SheetManager $sheetManager)   X-Ref

param: 0|positive-int $sheetIndex           Index of the sheet, based on order in the workbook (zero-based)
param: string         $associatedWorkbookId ID of the sheet's associated workbook
param: SheetManager   $sheetManager         To manage sheets

getIndex()   X-Ref

return: 0|positive-int Index of the sheet, based on order in the workbook (zero-based)

getAssociatedWorkbookId()   X-Ref
No description

getName()   X-Ref

return: string Name of the sheet

setName(string $name)   X-Ref
Sets the name of the sheet. Note that Excel has some restrictions on the name:
- it should not be blank
- it should not exceed 31 characters
- it should not contain these characters: \ / ? * : [ or ]
- it should be unique.

param: string $name Name of the sheet

isVisible()   X-Ref

return: bool isVisible Visibility of the sheet

setIsVisible(bool $isVisible)   X-Ref

param: bool $isVisible Visibility of the sheet

setSheetView(SheetView $sheetView)   X-Ref

return: $this

getSheetView()   X-Ref
No description

incrementWrittenRowCount()   X-Ref


getWrittenRowCount()   X-Ref

return: 0|positive-int

setAutoFilter(?AutoFilter $autoFilter)   X-Ref

return: $this

getAutoFilter()   X-Ref
No description

setColumnWidth(float $width, int ...$columns)   X-Ref

param: positive-int ...$columns One or more columns with this width

setColumnWidthForRange(float $width, int $start, int $end)   X-Ref

param: float        $width The width to set
param: positive-int $start First column index of the range
param: positive-int $end   Last column index of the range

getColumnWidths()   X-Ref

return: ColumnWidth[]