SpreadsheetPackage
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.CustomPackage, com.groupdocs.metadata.core.DocumentPackage
public class SpreadsheetPackage extends DocumentPackage
Represents a native metadata package in a spreadsheet.
Learn more
This example shows how to update built-in metadata properties in a spreadsheet.
try (Metadata metadata = new Metadata(Constants.InputXlsx)) { SpreadsheetRootPackage root = metadata.getRootPackageGeneric(); root.getDocumentProperties().setAuthor(“test author”); root.getDocumentProperties().setCreatedTime(new Date()); root.getDocumentProperties().setCompany(“GroupDocs”); root.getDocumentProperties().setCategory(“test category”); root.getDocumentProperties().setKeywords(“metadata, built-in, update”); // … metadata.save(Constants.OutputXlsx); }
| Method | Description |
|---|---|
| getLanguage() | Gets the document language. |
| setLanguage(String value) | Sets the document language. |
| getAuthor() | Gets the document author. |
| setAuthor(String value) | Sets the document author. |
| getCategory() | Gets the category. |
| setCategory(String value) | Sets the category. |
| getComments() | Gets the comments. |
| setComments(String value) | Sets the comments. |
| getCompany() | Gets the company. |
| setCompany(String value) | Sets the company. |
| getContentStatus() | Gets the content status. |
| setContentStatus(String value) | Sets the content status. |
| getContentType() | Gets the content type. |
| setContentType(String value) | Sets the content type. |
| getCreatedTime() | Gets the document created date. |
| setCreatedTime(Date value) | Sets the document created date. |
| getTotalEditingTime() | Gets the total editing time in minutes. |
| setTotalEditingTime(Double value) | Sets the total editing time in minutes. |
| getHyperlinkBase() | Gets the hyperlink base. |
| setHyperlinkBase(String value) | Sets the hyperlink base. |
| getKeywords() | Gets the keywords. |
| setKeywords(String value) | Sets the keywords. |
| getLastSavedTime() | Gets the time of the last saving in UTC. |
| setLastSavedTime(Date value) | Sets the time of the last saving in UTC. |
| getLastPrintedDate() | Gets the last printed date in UTC. |
| setLastPrintedDate(Date value) | Sets the last printed date in UTC. |
| getLastSavedBy() | Gets the name of the last author. |
| setLastSavedBy(String value) | Sets the name of the last author. |
| getManager() | Gets the manager. |
| setManager(String value) | Sets the manager. |
| getNameOfApplication() | Gets the name of application. |
| setNameOfApplication(String value) | Sets the name of application. |
| getRevision() | Gets the document revision number. |
| setRevision(String value) | Sets the document revision number. |
| getSubject() | Gets the subject. |
| setSubject(String value) | Sets the subject. |
| getTemplate() | Gets the document template name. |
| setTemplate(String value) | Sets the document template name. |
| getTitle() | Gets the title of the document. |
| setTitle(String value) | Sets the title of the document. |
| getVersion() | Gets the version number of the application that created the document. |
| setVersion(String value) | Sets the version number of the application that created the document. |
| getContentTypeProperties() | Gets the metadata package containing the content type properties. |
| set(String propertyName, String value) | Adds or replaces the metadata property with the specified name. |
| set(String propertyName, boolean value) | Adds or replaces the metadata property with the specified name. |
| set(String propertyName, Date value) | Adds or replaces the metadata property with the specified name. |
| set(String propertyName, int value) | Adds or replaces the metadata property with the specified name. |
| set(String propertyName, double value) | Adds or replaces the metadata property with the specified name. |
public final String getLanguage()
Gets the document language.
Returns: java.lang.String - The document language.
public final void setLanguage(String value)
Sets the document language.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The document language. |
public final String getAuthor()
Gets the document author.
Returns: java.lang.String - The author.
public final void setAuthor(String value)
Sets the document author.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The author. |
public final String getCategory()
Gets the category.
Returns: java.lang.String - The category.
public final void setCategory(String value)
Sets the category.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The category. |
public final String getComments()
Gets the comments.
Returns: java.lang.String - Comments value.
public final void setComments(String value)
Sets the comments.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | Comments value. |
public final String getCompany()
Gets the company.
Returns: java.lang.String - The company.
public final void setCompany(String value)
Sets the company.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The company. |
public final String getContentStatus()
Gets the content status.
Returns: java.lang.String - The content status.
public final void setContentStatus(String value)
Sets the content status.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The content status. |
public final String getContentType()
Gets the content type.
Returns: java.lang.String - The type of the content.
public final void setContentType(String value)
Sets the content type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The type of the content. |
public final Date getCreatedTime()
Gets the document created date.
Returns: java.util.Date - The created time.
public final void setCreatedTime(Date value)
Sets the document created date.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | The created time. |
public final Double getTotalEditingTime()
Gets the total editing time in minutes.
Returns: java.lang.Double - The total editing time.
public final void setTotalEditingTime(Double value)
Sets the total editing time in minutes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.Double | The total editing time. |
public final String getHyperlinkBase()
Gets the hyperlink base.
Returns: java.lang.String - The hyperlink base.
public final void setHyperlinkBase(String value)
Sets the hyperlink base.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The hyperlink base. |
public final String getKeywords()
Gets the keywords.
Returns: java.lang.String - Keywords.
public final void setKeywords(String value)
Sets the keywords.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | Keywords. |
public final Date getLastSavedTime()
Gets the time of the last saving in UTC.
Returns: java.util.Date - The time of the last saving.
public final void setLastSavedTime(Date value)
Sets the time of the last saving in UTC.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | The time of the last saving. |
public final Date getLastPrintedDate()
Gets the last printed date in UTC.
Returns: java.util.Date - The last printed date.
public final void setLastPrintedDate(Date value)
Sets the last printed date in UTC.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | The last printed date. |
public final String getLastSavedBy()
Gets the name of the last author.
Returns: java.lang.String - The name of the last author.
public final void setLastSavedBy(String value)
Sets the name of the last author.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The name of the last author. |
public final String getManager()
Gets the manager.
Returns: java.lang.String - The manager.
public final void setManager(String value)
Sets the manager.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The manager. |
public final String getNameOfApplication()
Gets the name of application.
Returns: java.lang.String - The name of application.
public final void setNameOfApplication(String value)
Sets the name of application.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The name of application. |
public final String getRevision()
Gets the document revision number.
Returns: java.lang.String - The revision number.
public final void setRevision(String value)
Sets the document revision number.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The revision number. |
public final String getSubject()
Gets the subject.
Returns: java.lang.String - The subject.
public final void setSubject(String value)
Sets the subject.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The subject. |
public final String getTemplate()
Gets the document template name.
Returns: java.lang.String - The template.
public final void setTemplate(String value)
Sets the document template name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The template. |
public final String getTitle()
Gets the title of the document.
Returns: java.lang.String - The title.
public final void setTitle(String value)
Sets the title of the document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The title. |
public final String getVersion()
Gets the version number of the application that created the document.
Returns: java.lang.String - The version.
Its format is “00.0000”,for example 12.0000
public final void setVersion(String value)
Sets the version number of the application that created the document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The version. |
Its format is “00.0000”,for example 12.0000 |
public final SpreadsheetContentTypePackage getContentTypeProperties()
Gets the metadata package containing the content type properties.
Returns: SpreadsheetContentTypePackage - The metadata package containing the content type properties.
public final void set(String propertyName, String value)
Adds or replaces the metadata property with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| propertyName | java.lang.String | The property name. |
| value | java.lang.String | The property value. |
public final void set(String propertyName, boolean value)
Adds or replaces the metadata property with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| propertyName | java.lang.String | The property name. |
| value | boolean | The property value. |
public final void set(String propertyName, Date value)
Adds or replaces the metadata property with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| propertyName | java.lang.String | The property name. |
| value | java.util.Date | The property value. |
public final void set(String propertyName, int value)
Adds or replaces the metadata property with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| propertyName | java.lang.String | The property name. |
| value | int | The property value. |
public final void set(String propertyName, double value)
Adds or replaces the metadata property with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| propertyName | java.lang.String | The property name. |
| value | double | The property value. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.