[]
Spread.Sheets.CustomDocPropsManager
• new CustomDocPropsManager(workbook
)
Represents a custom document property manager. It can manage custom properties on all documents.
Name | Type | Description |
---|---|---|
workbook |
Workbook |
The workbook. |
▸ add(propName
, value
, isLinkTarget?
): void
Set custom document property.
example
spread.docProps.customDocPropsManager.add('prop1', '1');
spread.docProps.customDocPropsManager.add('prop2', 'CellAlias', true);
Name | Type | Description |
---|---|---|
propName |
string |
Property name. |
value |
CustomDocumentPropertyValueType |
Property value. |
isLinkTarget? |
boolean |
Is it a content link. |
void
▸ all(props?
): undefined
| ICustomDocumentProperty
[]
Get or set custom document properties.
example
spread.docProps.customDocPropsManager.all([{ name: 'prop1', value: '1' }]);
spread.docProps.customDocPropsManager.all();
Name | Type | Description |
---|---|---|
props? |
ICustomDocumentProperty [] |
Custom document properties. |
undefined
| ICustomDocumentProperty
[]
Custom document properties.
▸ clear(): void
Clear custom document properties.
example
spread.docProps.customDocPropsManager.clear();
void
▸ 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');
Name | Type | Description |
---|---|---|
propName |
string |
Property name. |
undefined
| ICustomDocumentProperty
Custom document property.
▸ remove(propName
): void
Remove custom document property by property name.
example
spread.docProps.customDocPropsManager.remove('prop1');
Name | Type | Description |
---|---|---|
propName |
string |
Property name. |
void