[]
        
(Showing Draft Content)

GC.Spread.Sheets.CustomDocPropsManager

Class: CustomDocPropsManager

Spread.Sheets.CustomDocPropsManager

Table of contents

Constructors

Methods

Constructors

constructor

new CustomDocPropsManager(workbook)

Represents a custom document property manager. It can manage custom properties on all documents.

Parameters

Name Type Description
workbook Workbook The workbook.

Methods

add

add(propName, value, isLinkTarget?): void

Set custom document property.

example

spread.docProps.customDocPropsManager.add('prop1', '1');
spread.docProps.customDocPropsManager.add('prop2', 'CellAlias', true);

Parameters

Name Type Description
propName string Property name.
value CustomDocumentPropertyValueType Property value.
isLinkTarget? boolean Is it a content link.

Returns

void


all

all(props?): undefined | ICustomDocumentProperty[]

Get or set custom document properties.

example

spread.docProps.customDocPropsManager.all([{ name: 'prop1', value: '1' }]);
spread.docProps.customDocPropsManager.all();

Parameters

Name Type Description
props? ICustomDocumentProperty[] Custom document properties.

Returns

undefined | ICustomDocumentProperty[]

Custom document properties.


clear

clear(): void

Clear custom document properties.

example

spread.docProps.customDocPropsManager.clear();

Returns

void


get

get(propName): undefined | ICustomDocumentProperty

Get custom document property by property name.

example

spread.docProps.customDocPropsManager.all([{ name: 'prop1', value: '1' }]);
spread.docProps.customDocPropsManager.get('prop1');

Parameters

Name Type Description
propName string Property name.

Returns

undefined | ICustomDocumentProperty

Custom document property.


remove

remove(propName): void

Remove custom document property by property name.

example

spread.docProps.customDocPropsManager.remove('prop1');

Parameters

Name Type Description
propName string Property name.

Returns

void