java.lang.Object
com.aspose.cells.DocumentProperty
- All Implemented Interfaces:
- java.lang.Cloneable
public class DocumentProperty
- extends java.lang.Object
Represents a custom or built-in document property.
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.Object value) | |
|
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.
|
Property Getters/Setters Detail |
getName | |
public java.lang.String getName()
|
-
Returns the name of the property.
getValue/setValue | |
public java.lang.Object getValue() / public void setValue(java.lang.Object value)
|
-
Gets or sets the value of the property.
isLinkedToContent | |
public boolean isLinkedToContent()
|
-
Indicates whether this property is linked to content
getSource | |
public java.lang.String getSource()
|
-
The linked content source.
getType | |
public int getType()
|
-
Gets the data type of the property.
The value of the property is PropertyType integer constant.
isGeneratedName | |
public 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.
toString | |
public java.lang.String toString() |
-
Returns the property value as a string.
Converts a number property using Object.ToString(). Converts a boolean property
into "Y" or "N". Converts a date property into a short date string.
-
Returns the property value as integer.
Throws an exception if the property type is not PropertyType.Number.
toDouble | |
public double toDouble() |
-
Returns the property value as double.
Throws an exception if the property type is not PropertyType.Float.
toDateTime | |
public com.aspose.cells.DateTime toDateTime() |
-
Returns the property value as DateTime in local timezone.
Throws an exception if the property type is not PropertyType.Date.
toBool | |
public boolean toBool() |
-
Returns the property value as bool.
Throws an exception if the property type is not PropertyType.Boolean.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.