Aspose::Cells::Properties::CustomDocumentPropertyCollection class

CustomDocumentPropertyCollection class

A collection of custom document properties.

class CustomDocumentPropertyCollection : public Aspose::Cells::Properties::DocumentPropertyCollection

Methods

MethodDescription
Add(const U16String& name, const U16String& value)Creates a new custom document property of the PropertyType.String data type.
Add(const char16_t* name, const char16_t* value)Creates a new custom document property of the PropertyType.String data type.
Add(const U16String& name, int32_t value)Creates a new custom document property of the PropertyType.Number data type.
Add(const char16_t* name, int32_t value)Creates a new custom document property of the PropertyType.Number data type.
Add(const U16String& name, const Date& value)Creates a new custom document property of the PropertyType.DateTime data type.
Add(const char16_t* name, const Date& value)Creates a new custom document property of the PropertyType.DateTime data type.
Add(const U16String& name, bool value)Creates a new custom document property of the PropertyType.Boolean data type.
Add(const char16_t* name, bool value)Creates a new custom document property of the PropertyType.Boolean data type.
Add(const U16String& name, double value)Creates a new custom document property of the PropertyType.Float data type.
Add(const char16_t* name, double value)Creates a new custom document property of the PropertyType.Float data type.
AddLinkToContent(const U16String& name, const U16String& source)Creates a new custom document property which links to content.
AddLinkToContent(const char16_t* name, const char16_t* source)Creates a new custom document property which links to content.
Contains(const U16String& name)Returns true if a property with the specified name exists in the collection.
Contains(const char16_t* name)Returns true if a property with the specified name exists in the collection.
CustomDocumentPropertyCollection(CustomDocumentPropertyCollection_Impl* impl)Constructs from an implementation object.
CustomDocumentPropertyCollection(const CustomDocumentPropertyCollection& src)Copy constructor.
CustomDocumentPropertyCollection(const DocumentPropertyCollection& src)Constructs from a parent object.
DocumentPropertyCollection(DocumentPropertyCollection_Impl* impl)Constructs from an implementation object.
DocumentPropertyCollection(const DocumentPropertyCollection& src)Copy constructor.
Get(int32_t index)Returns a DocumentProperty object by index.
Get(const U16String& name)Returns a DocumentProperty object by the name of the property.
Get(const char16_t* name)Returns a DocumentProperty object by the name of the property.
GetCount()
IndexOf(const U16String& name)Gets the index of a property by name.
IndexOf(const char16_t* name)Gets the index of a property by name.
IsNull() constChecks whether the implementation object is nullptr.
explicit operator bool() constoperator bool()
operator=(const CustomDocumentPropertyCollection& src)operator=
operator=(const DocumentPropertyCollection& src)operator=
Remove(const U16String& name)Removes a property with the specified name from the collection.
Remove(const char16_t* name)Removes a property with the specified name from the collection.
RemoveAt(int32_t index)Removes a property at the specified index.
UpdateLinkedPropertyValue()Updates values of all custom properties that are linked to content(use cell value of linked range to update value of custom property).
UpdateLinkedRange()Updates all ranges that are linked to custom properties(use the value of custom document property to update cell value of linked range).
~CustomDocumentPropertyCollection()Destructor.
~DocumentPropertyCollection()Destructor.

Fields

FieldDescription
_implThe implementation object.

Remarks

Each DocumentProperty object represents a custom property of a container document.

Examples

Aspose::Cells::Startup();
//Instantiate a Workbook object
Workbook workbook(u"book1.xls");

//Retrieve a list of all custom document properties of the Excel file
CustomDocumentPropertyCollection customProperties = workbook.GetWorksheets().GetCustomDocumentProperties();

Aspose::Cells::Cleanup();

See Also