Example:
# Instantiate a Workbook object workbook = Workbook("CustomProperties.xlsx") # Retrieve a list of all custom document properties of the Excel file customProperties = workbook.getWorksheets().getCustomDocumentProperties() # Accessng a custom document property by using the property index customProperty1 = customProperties.get(3) # Accessng a custom document property by using the property name customProperty2 = customProperties.get("Owner")
Property Getters/Setters Summary | ||
---|---|---|
method | isGeneratedName() | |
Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API. | ||
method | isLinkedToContent() | |
Indicates whether this property is linked to content | ||
method | getName() | |
Returns the name of the property. | ||
method | getSource() | |
The linked content source. | ||
method | getType() | |
Gets the data type of the property. The value of the property is PropertyType integer constant. | ||
method | getValue() | |
method | setValue(value) | |
Gets or sets the value of the property. |
Method Summary | ||
---|---|---|
method | toBool() | |
Returns the property value as bool. | ||
method | toDateTime() | |
Returns the property value as DateTime in local timezone. | ||
method | toDouble() | |
Returns the property value as double. | ||
method | toInt() | |
Returns the property value as integer. | ||
method | toString() | |
Returns the property value as a string. |
Property Getters/Setters Detail |
---|
getName : String | |
String getName() |
getValue/setValue : Object | |
Object getValue() / setValue(value) |
isLinkedToContent : boolean | |
boolean isLinkedToContent() |
getSource : String | |
String getSource() |
getType : int | |
int getType() |
isGeneratedName : boolean | |
boolean isGeneratedName() |
Method Detail |
---|
toString | |
String toString() |
Converts a number property using Object.ToString(). Converts a boolean property into "Y" or "N". Converts a date property into a short date string.
toInt | |
int toInt() |
toDouble | |
float toDouble() |
toDateTime | |
DateTime toDateTime() |
Throws an exception if the property type is not PropertyType.Date.
toBool | |
boolean toBool() |
Throws an exception if the property type is not PropertyType.Boolean.