public final class XlsFormat extends DocumentFormat<XlsMetadata,XlsMetadataProperty,DocumentInfo> implements IProtectableFormat, IInspectable<XlsInspectionResult,XlsInspectionOptions>, ISignedFormat
Represents Excel format.
filePath, stream
Constructor and Description |
---|
XlsFormat(InputStream input)
Initializes a new instance of the
XlsFormat class. |
XlsFormat(String fileName)
Initializes a new instance of the
XlsFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
addContentTypeProperties(XlsContentProperty[] properties)
Adds the content type properties.
|
void |
addContentTypeProperty(XlsContentProperty property)
Adds the content type property.
|
void |
cleanMetadata()
Removes (reset) metadata.
|
void |
clearContentTypeProperties()
Removes all content type properties.
|
void |
clearCustomProperties()
Removes all custom document properties in
XlsFormat . |
XlsMetadata |
getDocumentProperties()
Gets the document properties in
XlsFormat . |
int |
getFileType()
Gets the file type like XLSX, XlSX etc.
|
int |
getType()
Gets document type.
|
boolean |
hasDigitalSignatures()
Gets
true if document contains DigitalSignature . |
XlsInspectionResult |
inspectDocument()
Inspects the document and returns comments and hidden sheets.
|
boolean |
isProtected()
Returns true if the document is encrypted and requires a password to open.
|
void |
removeHiddenData(XlsInspectionOptions options)
Removes the hidden data.
|
clearBuiltInProperties, extractDocumentProperties, getDocumentInfo, getThumbnail, readDocumentPropertyByKey, readPropertyByName, setProperties
dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public XlsFormat(String fileName)
Initializes a new instance of the XlsFormat
class.
fileName
- Absolute path to the file.public XlsFormat(InputStream input)
Initializes a new instance of the XlsFormat
class.
input
- The input.public int getType()
Gets document type.
Value: Document type.getType
in class FormatBase
public XlsMetadata getDocumentProperties()
Gets the document properties in XlsFormat
.
getDocumentProperties
in class DocumentFormat<XlsMetadata,XlsMetadataProperty,DocumentInfo>
public int getFileType()
Gets the file type like XLSX, XlSX etc.
Value: The file type.getFileType
in class DocumentFormat<XlsMetadata,XlsMetadataProperty,DocumentInfo>
public final boolean isProtected()
Returns true if the document is encrypted and requires a password to open.
Value:true
if document is protected; otherwise, false
.isProtected
in interface IProtectableFormat
public final boolean hasDigitalSignatures()
Gets true
if document contains DigitalSignature
.
hasDigitalSignatures
in interface ISignedFormat
GroupDocsException
- Could not read digital signatures.
Value:
true
if document has digital signatures; otherwise, false
.public void cleanMetadata()
Removes (reset) metadata. In some cases(Doc, Xls, Ppt, Pdf) metadata could not be deleted.
cleanMetadata
in class FormatBase
public void clearCustomProperties()
Removes all custom document properties in XlsFormat
.
clearCustomProperties
in class DocumentFormat<XlsMetadata,XlsMetadataProperty,DocumentInfo>
public final void addContentTypeProperties(XlsContentProperty[] properties)
Adds the content type properties.
properties
- Array of properties.
com.aspose.ms.System.ArgumentNullException
- Properties could not be null.public final void addContentTypeProperty(XlsContentProperty property)
Adds the content type property.
property
- Content type property.
com.aspose.ms.System.ArgumentNullException
- Property could not be null.public final void clearContentTypeProperties()
Removes all content type properties. Not supported in ODS format.
public final XlsInspectionResult inspectDocument()
Inspects the document and returns comments and hidden sheets.
inspectDocument
in interface IInspectable<XlsInspectionResult,XlsInspectionOptions>
XlsInspectionResult
.public final void removeHiddenData(XlsInspectionOptions options)
Removes the hidden data.
removeHiddenData
in interface IInspectable<XlsInspectionResult,XlsInspectionOptions>
options
- The inspection options.com.aspose.ms.System.ArgumentNullException
- Options could not be null.Copyright © 2017. All rights reserved.