ColumnDimension
extends Dimension
in package
Table of Contents
Properties
- $autoSize : bool
- Auto size?
- $collapsed : bool
- Collapsed.
- $columnIndex : string|null
- Column index.
- $outlineLevel : int
- Outline level.
- $visible : bool
- Visible?
- $width : float
- Column width.
- $xfIndex : int|null
- Index to cellXf. Null value means row has no explicit cellXf format.
Methods
- __construct() : mixed
- Create a new ColumnDimension.
- getAutoSize() : bool
- Get Auto Size.
- getCollapsed() : bool
- Get Collapsed.
- getColumnIndex() : string|null
- Get column index as string eg: 'A'.
- getColumnNumeric() : int
- Get column index as numeric.
- getOutlineLevel() : int
- Get Outline Level.
- getVisible() : bool
- Get Visible.
- getWidth() : float
- Get Width.
- getXfIndex() : int|null
- Get index to cellXf.
- setAutoSize() : $this
- Set Auto Size.
- setCollapsed() : $this
- Set Collapsed.
- setColumnIndex() : self
- Set column index as string eg: 'A'.
- setColumnNumeric() : self
- Set column index as numeric.
- setOutlineLevel() : $this
- Set Outline Level.
- setVisible() : $this
- Set Visible.
- setWidth() : $this
- Set Width.
- setXfIndex() : $this
- Set index to cellXf.
Properties
$autoSize
Auto size?
private
bool
$autoSize
= false
$collapsed
Collapsed.
private
bool
$collapsed
= false
$columnIndex
Column index.
private
string|null
$columnIndex
$outlineLevel
Outline level.
private
int
$outlineLevel
= 0
$visible
Visible?
private
bool
$visible
= true
$width
Column width.
private
float
$width
= -1
When this is set to a negative value, the column width should be ignored by IWriter
$xfIndex
Index to cellXf. Null value means row has no explicit cellXf format.
private
int|null
$xfIndex
Methods
__construct()
Create a new ColumnDimension.
public
__construct([string|null $index = 'A' ]) : mixed
Parameters
- $index : string|null = 'A'
-
Character column index
getAutoSize()
Get Auto Size.
public
getAutoSize() : bool
Return values
boolgetCollapsed()
Get Collapsed.
public
getCollapsed() : bool
Return values
boolgetColumnIndex()
Get column index as string eg: 'A'.
public
getColumnIndex() : string|null
Return values
string|nullgetColumnNumeric()
Get column index as numeric.
public
getColumnNumeric() : int
Return values
intgetOutlineLevel()
Get Outline Level.
public
getOutlineLevel() : int
Return values
intgetVisible()
Get Visible.
public
getVisible() : bool
Return values
boolgetWidth()
Get Width.
public
getWidth([string|null $unitOfMeasure = null ]) : float
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..
Parameters
- $unitOfMeasure : string|null = null
Return values
floatgetXfIndex()
Get index to cellXf.
public
getXfIndex() : int|null
Return values
int|nullsetAutoSize()
Set Auto Size.
public
setAutoSize(bool $autosizeEnabled) : $this
Parameters
- $autosizeEnabled : bool
Return values
$thissetCollapsed()
Set Collapsed.
public
setCollapsed(bool $collapsed) : $this
Parameters
- $collapsed : bool
Return values
$thissetColumnIndex()
Set column index as string eg: 'A'.
public
setColumnIndex(string $index) : self
Parameters
- $index : string
Return values
selfsetColumnNumeric()
Set column index as numeric.
public
setColumnNumeric(int $index) : self
Parameters
- $index : int
Return values
selfsetOutlineLevel()
Set Outline Level.
public
setOutlineLevel(int $level) : $this
Value must be between 0 and 7.
Parameters
- $level : int
Return values
$thissetVisible()
Set Visible.
public
setVisible(bool $visible) : $this
Parameters
- $visible : bool
Return values
$thissetWidth()
Set Width.
public
setWidth(float $width[, string|null $unitOfMeasure = null ]) : $this
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.
Parameters
- $width : float
- $unitOfMeasure : string|null = null
Return values
$thissetXfIndex()
Set index to cellXf.
public
setXfIndex(int $XfIndex) : $this
Parameters
- $XfIndex : int