com.extentech.ExtenXLS
Class EncryptedWorkBookHandle
java.lang.Object
com.extentech.ExtenXLS.DocumentHandle
com.extentech.ExtenXLS.WorkBookHandle
com.extentech.ExtenXLS.EncryptedWorkBookHandle
- All Implemented Interfaces:
- Document, Handle, WorkBook
public class EncryptedWorkBookHandle
- extends WorkBookHandle
EncryptedWorkBookHandle is a WorkBookHandle that manages encrypted files.
These files must be in Excel2007 + encrypted format. Earlier versions of encrypted files
will not be openable within this class
Passwords are required to open EncryptedWorkBooks, and if not re-set they will
save as encrypted files utilizing the same password that they were opened tos
| Fields inherited from interface com.extentech.ExtenXLS.WorkBook |
ALLOWDUPES, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, SHAREDUPES, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE |
|
Constructor Summary |
EncryptedWorkBookHandle(InputStream encryptedBook,
String password)
Create a new WorkBookHandle from the byte array passed in. |
EncryptedWorkBookHandle(String password)
Default constructor creates a new, empty EncryptedWorkBookHandle with
a password set for saveEncrypted functionality
3 WorkSheets: "Sheet1","Sheet2",and "Sheet3". |
| Methods inherited from class com.extentech.ExtenXLS.WorkBookHandle |
addSheetFromWorkBook, addSheetFromWorkBookWithFormatting, addWorkSheet, addWorkSheet, calculateFormulas, copyChartToSheet, copyChartToSheet, copyWorkSheet, createChart, createNamedRange, createWorkSheet, createWorkSheet, deleteChart, forceRecalc, getAllStrings, getBytes, getCell, getCellRanges, getCells, getChart, getChartById, getCharts, getConditionalFormats, getFormats, getFormulaCalculationMode, getFormulaHandle, getImage, getImages, getIsExcel2007, getName, getNamedRange, getNamedRangeInScope, getNamedRanges, getNamedRangesInScope, getNoSheetWorkBook, getNumCells, getNumWorkSheets, getPivotTable, getPivotTables, getStats, getStats, getWorkBook, getWorkSheet, getWorkSheet, getWorkSheets, getXLSVersionString, is1904, recalc, removeAllWorkSheets, searchAndReplace, setDefaultColWidth, setDefaultRowHeight, setDupeStringMode, setFormulaCalculationMode, setProtected, setShowSheetTabs, setStringEncodingMode, showSheetTabs, write, write, write, write, writeBytes, writeXLSXBytes |
| Methods inherited from class com.extentech.ExtenXLS.DocumentHandle |
addProperty, close, finalize, getFactory, getProperties, getProperty, getVersion, getWorkingDirectory, reset, setDebugLevel, setName, setProperties, toString |
EncryptedWorkBookHandle
public EncryptedWorkBookHandle(String password)
- Default constructor creates a new, empty EncryptedWorkBookHandle with
a password set for saveEncrypted functionality
3 WorkSheets: "Sheet1","Sheet2",and "Sheet3".
EncryptedWorkBookHandle
public EncryptedWorkBookHandle(InputStream encryptedBook,
String password)
throws com.extentech.formats.XLS.WorkBookException
- Create a new WorkBookHandle from the byte array passed in. InputStream passed in must
contain a valid xls or xlsx workbook file
- Parameters:
encryptedBook - - InputStream containing the valid XLS or XLSX file for reading
- Throws:
WorkBookException - if the inputstream cannot be parsed correctly. Note the error codes provided in WorkBookException can
detail if password is incorrect, if file is corrupt, etc.
com.extentech.formats.XLS.WorkBookException
writeEncrypted
public void writeEncrypted(OutputStream out,
String password)
throws com.extentech.formats.XLS.WorkBookException
- Write a workbook in 128 bit encryption to the OutputStream provided.
For more control over encryption, please utilize
the extentech.crypto.mscrypto.MSOfficeEncryption classes
- Parameters:
out - password - = new password to set to the encrypted workbook
- Throws:
com.extentech.formats.XLS.WorkBookException
writeAndEncrypt
public static void writeAndEncrypt(WorkBookHandle book,
OutputStream out,
String password)
throws com.extentech.formats.XLS.WorkBookException
- Write a workbook in 128 bit encryption to the OutputStream provided.
For more control over encryption, please utilize
the extentech.crypto.mscrypto.MSOfficeEncryption classes
- Parameters:
out - password - = new password to set to the encrypted workbook
- Throws:
com.extentech.formats.XLS.WorkBookException
writeEncrypted
public void writeEncrypted(OutputStream out)
throws com.extentech.formats.XLS.WorkBookException
- Write a workbook in 128 bit encryption to the OutputStream provided.
For more control over encryption, please utilize
the extentech.crypto.mscrypto.MSOfficeEncryption classes
File will be written utilizing the same password it was opened with
- Parameters:
out - password -
- Throws:
com.extentech.formats.XLS.WorkBookException
Copyright © 2010 Extentech Inc. All Rights Reserved.