com.groupdocs.metadata.core

Interfaces

Classes

Exceptions

com.groupdocs.metadata.core

Class SpreadsheetPackage

  • All Implemented Interfaces:
    Iterable<MetadataProperty>


    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 Detail

      • getLanguage

        public final String getLanguage()

        Gets the document language.

        Returns:
        The document language.
      • setLanguage

        public final void setLanguage(String value)

        Sets the document language.

        Parameters:
        value - The document language.
      • getAuthor

        public final String getAuthor()

        Gets the document author.

        Returns:
        The author.
      • setAuthor

        public final void setAuthor(String value)

        Sets the document author.

        Parameters:
        value - The author.
      • getCategory

        public final String getCategory()

        Gets the category.

        Returns:
        The category.
      • setCategory

        public final void setCategory(String value)

        Sets the category.

        Parameters:
        value - The category.
      • getComments

        public final String getComments()

        Gets the comments.

        Returns:
        Comments value.
      • setComments

        public final void setComments(String value)

        Sets the comments.

        Parameters:
        value - Comments value.
      • getCompany

        public final String getCompany()

        Gets the company.

        Returns:
        The company.
      • setCompany

        public final void setCompany(String value)

        Sets the company.

        Parameters:
        value - The company.
      • getContentStatus

        public final String getContentStatus()

        Gets the content status.

        Returns:
        The content status.
      • setContentStatus

        public final void setContentStatus(String value)

        Sets the content status.

        Parameters:
        value - The content status.
      • getContentType

        public final String getContentType()

        Gets the content type.

        Returns:
        The type of the content.
      • setContentType

        public final void setContentType(String value)

        Sets the content type.

        Parameters:
        value - The type of the content.
      • getCreatedTime

        public final Date getCreatedTime()

        Gets the document created date.

        Returns:
        The created time.
      • setCreatedTime

        public final void setCreatedTime(Date value)

        Sets the document created date.

        Parameters:
        value - The created time.
      • getTotalEditingTime

        public final Double getTotalEditingTime()

        Gets the total editing time in minutes.

        Returns:
        The total editing time.
      • setTotalEditingTime

        public final void setTotalEditingTime(Double value)

        Sets the total editing time in minutes.

        Parameters:
        value - The total editing time.
      • getHyperlinkBase

        public final String getHyperlinkBase()

        Gets the hyperlink base.

        Returns:
        The hyperlink base.
      • setHyperlinkBase

        public final void setHyperlinkBase(String value)

        Sets the hyperlink base.

        Parameters:
        value - The hyperlink base.
      • getKeywords

        public final String getKeywords()

        Gets the keywords.

        Returns:
        Keywords.
      • setKeywords

        public final void setKeywords(String value)

        Sets the keywords.

        Parameters:
        value - Keywords.
      • getLastSavedTime

        public final Date getLastSavedTime()

        Gets the time of the last saving in UTC.

        Returns:
        The time of the last saving.
      • setLastSavedTime

        public final void setLastSavedTime(Date value)

        Sets the time of the last saving in UTC.

        Parameters:
        value - The time of the last saving.
      • getLastPrintedDate

        public final Date getLastPrintedDate()

        Gets the last printed date in UTC.

        Returns:
        The last printed date.
      • setLastPrintedDate

        public final void setLastPrintedDate(Date value)

        Sets the last printed date in UTC.

        Parameters:
        value - The last printed date.
      • getLastSavedBy

        public final String getLastSavedBy()

        Gets the name of the last author.

        Returns:
        The name of the last author.
      • setLastSavedBy

        public final void setLastSavedBy(String value)

        Sets the name of the last author.

        Parameters:
        value - The name of the last author.
      • getManager

        public final String getManager()

        Gets the manager.

        Returns:
        The manager.
      • setManager

        public final void setManager(String value)

        Sets the manager.

        Parameters:
        value - The manager.
      • getNameOfApplication

        public final String getNameOfApplication()

        Gets the name of application.

        Returns:
        The name of application.
      • setNameOfApplication

        public final void setNameOfApplication(String value)

        Sets the name of application.

        Parameters:
        value - The name of application.
      • getRevision

        public final String getRevision()

        Gets the document revision number.

        Returns:
        The revision number.
      • setRevision

        public final void setRevision(String value)

        Sets the document revision number.

        Parameters:
        value - The revision number.
      • getSubject

        public final String getSubject()

        Gets the subject.

        Returns:
        The subject.
      • setSubject

        public final void setSubject(String value)

        Sets the subject.

        Parameters:
        value - The subject.
      • getTemplate

        public final String getTemplate()

        Gets the document template name.

        Returns:
        The template.
      • setTemplate

        public final void setTemplate(String value)

        Sets the document template name.

        Parameters:
        value - The template.
      • getTitle

        public final String getTitle()

        Gets the title of the document.

        Returns:
        The title.
      • setTitle

        public final void setTitle(String value)

        Sets the title of the document.

        Parameters:
        value - The title.
      • getVersion

        public final String getVersion()

        Gets the version number of the application that created the document.

        Returns:
        The version.


        Its format is "00.0000",for example 12.0000
      • setVersion

        public final void setVersion(String value)

        Sets the version number of the application that created the document.

        Parameters:
        value - The version.


        Its format is "00.0000",for example 12.0000
      • getContentTypeProperties

        public final SpreadsheetContentTypePackage getContentTypeProperties()

        Gets the metadata package containing the content type properties.

        Returns:
        The metadata package containing the content type properties.
      • set

        public final void set(String propertyName,
               String value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
               boolean value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
               Date value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
               int value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
               double value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.