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); }
Modifier and Type | Method and Description |
---|---|
String |
getAuthor()
Gets the document author.
|
String |
getCategory()
Gets the category.
|
String |
getComments()
Gets the comments.
|
String |
getCompany()
Gets the company.
|
String |
getContentStatus()
Gets the content status.
|
String |
getContentType()
Gets the content type.
|
SpreadsheetContentTypePackage |
getContentTypeProperties()
Gets the metadata package containing the content type properties.
|
Date |
getCreatedTime()
Gets the document created date.
|
String |
getHyperlinkBase()
Gets the hyperlink base.
|
String |
getKeywords()
Gets the keywords.
|
String |
getLanguage()
Gets the document language.
|
Date |
getLastPrintedDate()
Gets the last printed date in UTC.
|
String |
getLastSavedBy()
Gets the name of the last author.
|
Date |
getLastSavedTime()
Gets the time of the last saving in UTC.
|
String |
getManager()
Gets the manager.
|
String |
getNameOfApplication()
Gets the name of application.
|
String |
getRevision()
Gets the document revision number.
|
String |
getSubject()
Gets the subject.
|
String |
getTemplate()
Gets the document template name.
|
String |
getTitle()
Gets the title of the document.
|
Double |
getTotalEditingTime()
Gets the total editing time in minutes.
|
String |
getVersion()
Gets the version number of the application that created the document.
|
void |
set(String propertyName,
boolean value)
Adds or replaces the metadata property with the specified name.
|
void |
set(String propertyName,
Date value)
Adds or replaces the metadata property with the specified name.
|
void |
set(String propertyName,
double value)
Adds or replaces the metadata property with the specified name.
|
void |
set(String propertyName,
int value)
Adds or replaces the metadata property with the specified name.
|
void |
set(String propertyName,
String value)
Adds or replaces the metadata property with the specified name.
|
void |
setAuthor(String value)
Sets the document author.
|
void |
setCategory(String value)
Sets the category.
|
void |
setComments(String value)
Sets the comments.
|
void |
setCompany(String value)
Sets the company.
|
void |
setContentStatus(String value)
Sets the content status.
|
void |
setContentType(String value)
Sets the content type.
|
void |
setCreatedTime(Date value)
Sets the document created date.
|
void |
setHyperlinkBase(String value)
Sets the hyperlink base.
|
void |
setKeywords(String value)
Sets the keywords.
|
void |
setLanguage(String value)
Sets the document language.
|
void |
setLastPrintedDate(Date value)
Sets the last printed date in UTC.
|
void |
setLastSavedBy(String value)
Sets the name of the last author.
|
void |
setLastSavedTime(Date value)
Sets the time of the last saving in UTC.
|
void |
setManager(String value)
Sets the manager.
|
void |
setNameOfApplication(String value)
Sets the name of application.
|
void |
setRevision(String value)
Sets the document revision number.
|
void |
setSubject(String value)
Sets the subject.
|
void |
setTemplate(String value)
Sets the document template name.
|
void |
setTitle(String value)
Sets the title of the document.
|
void |
setTotalEditingTime(Double value)
Sets the total editing time in minutes.
|
void |
setVersion(String value)
Sets the version number of the application that created the document.
|
clear, clearBuiltInProperties, clearCustomProperties, remove
addProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, sanitize, setProperties, updateProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public final String getLanguage()
Gets the document language.
public final void setLanguage(String value)
Sets the document language.
value
- The document language.public final String getAuthor()
Gets the document author.
public final void setAuthor(String value)
Sets the document author.
value
- The author.public final String getCategory()
Gets the category.
public final void setCategory(String value)
Sets the category.
value
- The category.public final String getComments()
Gets the comments.
public final void setComments(String value)
Sets the comments.
value
- Comments value.public final String getCompany()
Gets the company.
public final void setCompany(String value)
Sets the company.
value
- The company.public final String getContentStatus()
Gets the content status.
public final void setContentStatus(String value)
Sets the content status.
value
- The content status.public final String getContentType()
Gets the content type.
public final void setContentType(String value)
Sets the content type.
value
- The type of the content.public final Date getCreatedTime()
Gets the document created date.
public final void setCreatedTime(Date value)
Sets the document created date.
value
- The created time.public final Double getTotalEditingTime()
Gets the total editing time in minutes.
public final void setTotalEditingTime(Double value)
Sets the total editing time in minutes.
value
- The total editing time.public final String getHyperlinkBase()
Gets the hyperlink base.
public final void setHyperlinkBase(String value)
Sets the hyperlink base.
value
- The hyperlink base.public final String getKeywords()
Gets the keywords.
public final void setKeywords(String value)
Sets the keywords.
value
- Keywords.public final Date getLastSavedTime()
Gets the time of the last saving in UTC.
public final void setLastSavedTime(Date value)
Sets the time of the last saving in UTC.
value
- The time of the last saving.public final Date getLastPrintedDate()
Gets the last printed date in UTC.
public final void setLastPrintedDate(Date value)
Sets the last printed date in UTC.
value
- The last printed date.public final String getLastSavedBy()
Gets the name of the last author.
public final void setLastSavedBy(String value)
Sets the name of the last author.
value
- The name of the last author.public final String getManager()
Gets the manager.
public final void setManager(String value)
Sets the manager.
value
- The manager.public final String getNameOfApplication()
Gets the name of application.
public final void setNameOfApplication(String value)
Sets the name of application.
value
- The name of application.public final String getRevision()
Gets the document revision number.
public final void setRevision(String value)
Sets the document revision number.
value
- The revision number.public final String getSubject()
Gets the subject.
public final void setSubject(String value)
Sets the subject.
value
- The subject.public final String getTemplate()
Gets the document template name.
public final void setTemplate(String value)
Sets the document template name.
value
- The template.public final String getTitle()
Gets the title of the document.
public final void setTitle(String value)
Sets the title of the document.
value
- The title.public final String getVersion()
Gets the version number of the application that created the document.
public final void setVersion(String value)
Sets the version number of the application that created the document.
value
- The version.
public final SpreadsheetContentTypePackage getContentTypeProperties()
Gets 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.
propertyName
- The property name.value
- The property value.public final void set(String propertyName, boolean value)
Adds or replaces the metadata property with the specified name.
propertyName
- The property name.value
- The property value.public final void set(String propertyName, Date value)
Adds or replaces the metadata property with the specified name.
propertyName
- The property name.value
- The property value.public final void set(String propertyName, int value)
Adds or replaces the metadata property with the specified name.
propertyName
- The property name.value
- The property value.public final void set(String propertyName, double value)
Adds or replaces the metadata property with the specified name.
propertyName
- The property name.value
- The property value.