Properties

$author

$author : string

Author.

Type

string

$text

$text : \PhpOffice\PhpSpreadsheet\RichText\RichText

Rich text comment.

Type

\PhpOffice\PhpSpreadsheet\RichText\RichText

$width

$width : string

Comment width (CSS style, i.e. XXpx or YYpt).

Type

string

$marginLeft

$marginLeft : string

Left margin (CSS style, i.e. XXpx or YYpt).

Type

string

$marginTop

$marginTop : string

Top margin (CSS style, i.e. XXpx or YYpt).

Type

string

$visible

$visible : boolean

Visible.

Type

boolean

$height

$height : string

Comment height (CSS style, i.e. XXpx or YYpt).

Type

string

$alignment

$alignment : string

Alignment.

Type

string

Methods

__construct()

__construct() 

Create a new Comment.

getAuthor()

getAuthor() : string

Get Author.

Returns

string

setAuthor()

setAuthor(string  $author) : $this

Set Author.

Parameters

string $author

Returns

$this

getText()

getText() : \PhpOffice\PhpSpreadsheet\RichText\RichText

Get Rich text comment.

Returns

\PhpOffice\PhpSpreadsheet\RichText\RichText

setText()

setText(\PhpOffice\PhpSpreadsheet\RichText\RichText  $pValue) : $this

Set Rich text comment.

Parameters

\PhpOffice\PhpSpreadsheet\RichText\RichText $pValue

Returns

$this

getWidth()

getWidth() : string

Get comment width (CSS style, i.e. XXpx or YYpt).

Returns

string

setWidth()

setWidth(string  $width) : $this

Set comment width (CSS style, i.e. XXpx or YYpt).

Parameters

string $width

Returns

$this

getHeight()

getHeight() : string

Get comment height (CSS style, i.e. XXpx or YYpt).

Returns

string

setHeight()

setHeight(string  $value) : $this

Set comment height (CSS style, i.e. XXpx or YYpt).

Parameters

string $value

Returns

$this

getMarginLeft()

getMarginLeft() : string

Get left margin (CSS style, i.e. XXpx or YYpt).

Returns

string

setMarginLeft()

setMarginLeft(string  $value) : $this

Set left margin (CSS style, i.e. XXpx or YYpt).

Parameters

string $value

Returns

$this

getMarginTop()

getMarginTop() : string

Get top margin (CSS style, i.e. XXpx or YYpt).

Returns

string

setMarginTop()

setMarginTop(string  $value) : $this

Set top margin (CSS style, i.e. XXpx or YYpt).

Parameters

string $value

Returns

$this

getVisible()

getVisible() : boolean

Is the comment visible by default?

Returns

boolean

setVisible()

setVisible(boolean  $value) : $this

Set comment default visibility.

Parameters

boolean $value

Returns

$this

setAlignment()

setAlignment(string  $alignment) : $this

Set Alignment.

Parameters

string $alignment

see Style\Alignment::HORIZONTAL_*

Returns

$this

getAlignment()

getAlignment() : string

Get Alignment.

Returns

string

getHashCode()

getHashCode() : string

Get hash code.

Returns

string —

Hash code

__clone()

__clone() 

Implement PHP __clone to create a deep clone, not just a shallow copy.

__toString()

__toString() : string

Convert to string.

Returns

string