Documentation

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

$collapsed

Collapsed.

private bool $collapsed = false

$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
bool

getCollapsed()

Get Collapsed.

public getCollapsed() : bool
Return values
bool

getColumnIndex()

Get column index as string eg: 'A'.

public getColumnIndex() : string|null
Return values
string|null

getColumnNumeric()

Get column index as numeric.

public getColumnNumeric() : int
Return values
int

getOutlineLevel()

Get Outline Level.

public getOutlineLevel() : int
Return values
int

getVisible()

Get Visible.

public getVisible() : bool
Return values
bool

getWidth()

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
float

getXfIndex()

Get index to cellXf.

public getXfIndex() : int|null
Return values
int|null

setAutoSize()

Set Auto Size.

public setAutoSize(bool $autosizeEnabled) : $this
Parameters
$autosizeEnabled : bool
Return values
$this

setCollapsed()

Set Collapsed.

public setCollapsed(bool $collapsed) : $this
Parameters
$collapsed : bool
Return values
$this

setColumnIndex()

Set column index as string eg: 'A'.

public setColumnIndex(string $index) : self
Parameters
$index : string
Return values
self

setColumnNumeric()

Set column index as numeric.

public setColumnNumeric(int $index) : self
Parameters
$index : int
Return values
self

setOutlineLevel()

Set Outline Level.

public setOutlineLevel(int $level) : $this

Value must be between 0 and 7.

Parameters
$level : int
Return values
$this

setVisible()

Set Visible.

public setVisible(bool $visible) : $this
Parameters
$visible : bool
Return values
$this

setWidth()

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

setXfIndex()

Set index to cellXf.

public setXfIndex(int $XfIndex) : $this
Parameters
$XfIndex : int
Return values
$this

        
On this page

Search results