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: 137 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ColumnDimension:: (9 methods):
  __construct()
  getColumnIndex()
  setColumnIndex()
  getColumnNumeric()
  setColumnNumeric()
  getWidth()
  setWidth()
  getAutoSize()
  setAutoSize()


Class: ColumnDimension  - X-Ref

__construct($index = 'A')   X-Ref
Create a new ColumnDimension.

param: string $index Character column index

getColumnIndex()   X-Ref
Get column index as string eg: 'A'.


setColumnIndex(string $index)   X-Ref
Set column index as string eg: 'A'.


getColumnNumeric()   X-Ref
Get column index as numeric.


setColumnNumeric(int $index)   X-Ref
Set column index as numeric.


getWidth(?string $unitOfMeasure = null)   X-Ref
Get Width.

Each unit of column width is equal to the width of one character in the default font size. A value of -1
tells Excel to display this column in its default width.
By default, this will be the return value; but this method also accepts an optional unit of measure argument
and will convert the returned value to the specified UoM..

setWidth(float $width, ?string $unitOfMeasure = null)   X-Ref
Set Width.

Each unit of column width is equal to the width of one character in the default font size. A value of -1
tells Excel to display this column in its default width.
By default, this will be the unit of measure for the passed value; but this method also accepts an
optional unit of measure argument, and will convert the value from the specified UoM using an
approximation method.

return: $this

getAutoSize()   X-Ref
Get Auto Size.


setAutoSize(bool $autosizeEnabled)   X-Ref
Set Auto Size.

return: $this