public class FileFormatUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static FileFormatInfo |
detectFileFormat(java.io.InputStream stream)
Detects and returns the information about a format of an excel stored in a stream.
|
static FileFormatInfo |
detectFileFormat(java.io.InputStream stream,
java.lang.String password)
Detects and returns the information about a format of an excel stored in a stream.
|
static FileFormatInfo |
detectFileFormat(java.lang.String filePath)
Detects and returns the information about a format of an excel stored in a file.
|
static FileFormatInfo |
detectFileFormat(java.lang.String filePath,
java.lang.String password)
Detects and returns the information about a format of an excel stored in a file.
|
static int |
extensionToSaveFormat(java.lang.String extension)
Converts a file name extension into a SaveFormat value.
|
static int |
fileFormatToSaveFormat(int format)
Converting file format to save format.
|
static boolean |
isTemplateFormat(java.lang.String extension)
Returns true if the extension is .xlt, .xltX, .xltm,.ots.
|
static java.lang.String |
loadFormatToExtension(int loadFormat)
Converts a load format enumerated value into a file extension.
|
static int |
loadFormatToSaveFormat(int loadFormat)
Converts a LoadFormat value to a SaveFormat value if possible.
|
static java.lang.String |
saveFormatToExtension(int format)
Converts a save format enumerated value into a file extension.
|
static int |
saveFormatToLoadFormat(int saveFormat)
Converts a SaveFormat value to a LoadFormat value if possible.
|
static boolean |
verifyPassword(java.io.InputStream stream,
java.lang.String password)
Detects and returns the information about a format of an excel stored in a stream.
|
public static FileFormatInfo detectFileFormat(java.io.InputStream stream)
stream - The streamFileFormatInfo object that contains the detected information.public static FileFormatInfo detectFileFormat(java.io.InputStream stream, java.lang.String password)
stream - password - The password for encrypted ooxml files.FileFormatInfo object that contains the detected information.public static boolean verifyPassword(java.io.InputStream stream,
java.lang.String password)
stream - password - The password for encrypted ooxml files.public static FileFormatInfo detectFileFormat(java.lang.String filePath)
filePath - The file path.FileFormatInfo object that contains the detected information.public static FileFormatInfo detectFileFormat(java.lang.String filePath, java.lang.String password)
filePath - The file path.password - The password for encrypted ooxml files.FileFormatInfo object that contains the detected information.public static int fileFormatToSaveFormat(int format)
format - FileFormatType. The file format type.SaveFormat.public static int extensionToSaveFormat(java.lang.String extension)
Remarks
If the extension cannot be recognized, returnsSaveFormat.UNKNOWN.extension - The file extension. Can be with or without a leading dot. Case-insensitive.SaveFormat.public static boolean isTemplateFormat(java.lang.String extension)
extension - public static java.lang.String loadFormatToExtension(int loadFormat)
Remarks
If it can not be converted, returns null.loadFormat - LoadFormat. The loaded file format.public static int loadFormatToSaveFormat(int loadFormat)
loadFormat - LoadFormat. The load format.SaveFormat. The save format.public static java.lang.String saveFormatToExtension(int format)
format - SaveFormat. The save format.public static int saveFormatToLoadFormat(int saveFormat)
saveFormat - SaveFormat. The save format.LoadFormat. The load formatSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.