Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension Class Reference
Inheritance diagram for PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension:
PhpOffice\PhpSpreadsheet\Worksheet\Dimension

Public Member Functions

 __construct (?string $index='A')
 Create a new ColumnDimension.
 
 getAutoSize ()
 Get Auto Size.
 
 getCollapsed ()
 Get Collapsed.
 
 getColumnIndex ()
 Get column index as string eg: 'A'.
 
 getColumnNumeric ()
 Get column index as numeric.
 
 getOutlineLevel ()
 Get Outline Level.
 
 getVisible ()
 Get Visible.
 
 getWidth (?string $unitOfMeasure=null)
 Get Width.
 
 getXfIndex ()
 Get index to cellXf.
 
 setAutoSize (bool $autosizeEnabled)
 Set Auto Size.
 
 setCollapsed (bool $collapsed)
 Set Collapsed.
 
 setColumnIndex (string $index)
 Set column index as string eg: 'A'.
 
 setColumnNumeric (int $index)
 Set column index as numeric.
 
 setOutlineLevel (int $level)
 Set Outline Level.
 
 setVisible (bool $visible)
 Set Visible.
 
 setWidth (float $width, ?string $unitOfMeasure=null)
 Set Width.
 
 setXfIndex (int $XfIndex)
 Set index to cellXf.
 

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension::__construct ( ?string $index = 'A')

Create a new ColumnDimension.

Parameters
?string$indexCharacter column index

Member Function Documentation

◆ getWidth()

PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension::getWidth ( ?string $unitOfMeasure = null)

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..

◆ setAutoSize()

PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension::setAutoSize ( bool $autosizeEnabled)

Set Auto Size.

Return values
$this

◆ setCollapsed()

PhpOffice\PhpSpreadsheet\Worksheet\Dimension::setCollapsed ( bool $collapsed)
inherited

Set Collapsed.

Return values
$this

◆ setOutlineLevel()

PhpOffice\PhpSpreadsheet\Worksheet\Dimension::setOutlineLevel ( int $level)
inherited

Set Outline Level.

Value must be between 0 and 7.

Return values
$this

◆ setVisible()

PhpOffice\PhpSpreadsheet\Worksheet\Dimension::setVisible ( bool $visible)
inherited

Set Visible.

Return values
$this

◆ setWidth()

PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension::setWidth ( float $width,
?string $unitOfMeasure = null )

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 values
$this

◆ setXfIndex()

PhpOffice\PhpSpreadsheet\Worksheet\Dimension::setXfIndex ( int $XfIndex)
inherited

Set index to cellXf.

Return values
$this

The documentation for this class was generated from the following file: