Properties

$author

$author : string

Author.

Type

string

$text

$text : \PhpOffice\PhpSpreadsheet\RichText\RichText

Rich text comment.

Type

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

Visible.

Type

bool

$height

$height : string

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

Type

string

$fillColor

$fillColor : \PhpOffice\PhpSpreadsheet\Style\Color

Comment fill color.

Type

Color

$alignment

$alignment : string

Alignment.

Type

string

Methods

__construct()

__construct() : mixed

Create a new Comment.

Returns

mixed —

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() : bool

Is the comment visible by default?

Returns

bool —

setVisible()

setVisible(bool  $value) : $this

Set comment default visibility.

Parameters

bool $value

Returns

$this —

getFillColor()

getFillColor() : \PhpOffice\PhpSpreadsheet\Style\Color

Get fill color.

Returns

\PhpOffice\PhpSpreadsheet\Style\Color —

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() : mixed

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

Returns

mixed —

__toString()

__toString() : string

Convert to string.

Returns

string —