public class DocumentProperty
Example:
//Instantiate a Workbook object
Workbook workbook = new Workbook("C:\\book1.xls");
//Retrieve a list of all custom document properties of the Excel file
CustomDocumentPropertyCollection customProperties = workbook.getWorksheets().getCustomDocumentProperties();
//Accessng a custom document property by using the property index
DocumentProperty customProperty1 = customProperties.get(3);
//Accessng a custom document property by using the property name
DocumentProperty customProperty2 = customProperties.get("Owner");
Property Getters/Setters Summary | ||
---|---|---|
boolean | 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.
|
||
boolean | isLinkedToContent() | |
Indicates whether this property is linked to content
|
||
java.lang.String | getName() | |
Returns the name of the property.
|
||
java.lang.String | getSource() | |
The linked content source.
|
||
int | getType() | |
Gets the data type of the property.
The value of the property is PropertyType integer constant. |
||
java.lang.Object | getValue() | |
void | setValue(java.lang.Objectvalue) | |
Gets or sets the value of the property. |
Method Summary | ||
---|---|---|
boolean | toBool() | |
Returns the property value as bool.
|
||
com.aspose.cells.DateTime | toDateTime() | |
Returns the property value as DateTime in local timezone.
|
||
double | toDouble() | |
Returns the property value as double.
|
||
int | toInt() | |
Returns the property value as integer.
|
||
java.lang.String | toString() | |
Returns the property value as a string.
|
public java.lang.String getName()
public java.lang.Object getValue() / public void setValue(java.lang.Object value)
public boolean isLinkedToContent()
public java.lang.String getSource()
public int getType()
public boolean isGeneratedName()
public java.lang.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.
public int toInt()
public double toDouble()
public com.aspose.cells.DateTime toDateTime()
Throws an exception if the property type is not PropertyType.Date.
public boolean toBool()
Throws an exception if the property type is not PropertyType.Boolean.