public interface IWorkbook
| Modifier and Type | Method and Description |
|---|---|
void |
addDataSource(java.lang.String name,
java.lang.Object dataSource)
Add data source for template
|
void |
calculate()
Calculates formulas of the workbook as needed.
|
void |
dirty()
Designates all the formulas of the workbook to be recalculated when the next
calculation occurs.
|
java.util.List<JsonError> |
fromJson(java.io.InputStream stream)
Generates a workbook from a json stream.
|
java.util.List<JsonError> |
fromJson(java.io.InputStream stream,
DeserializationOptions deserializationOptions)
Generates a workbook from a json stream.
|
java.util.List<JsonError> |
fromJson(java.lang.String json)
Generates a workbook from a json string.
|
java.util.List<JsonError> |
fromJson(java.lang.String json,
DeserializationOptions deserializationOptions)
Generates a workbook from a json string.
|
IWorksheet |
getActiveSheet()
Returns an object that represents the active sheet (the sheet on top) in the
active workbook or in the specified window or workbook.
|
Event<EventHandler<EventArgs>> |
getAfterSaveEvent()
Occurs after the workbook is saved.
|
boolean |
getAllowDynamicArray()
Deprecated.
|
java.lang.String |
getAuthor()
Gets the author.
|
boolean |
getAutoParse()
Gets whether to automatically parse when setting a range value to a string
value.
|
boolean |
getAutoRoundValue()
Gets whether to round the number to 15 significant figures when getting the value.
|
Event<EventHandler<EventArgs>> |
getBeforeSaveEvent()
Occurs before the workbook is saved.
|
IWorkbookView |
getBookView()
Returns an object that represents the view settings of this workbook.
|
IBuiltInDocumentPropertyCollection |
getBuiltInDocumentProperties()
Gets a collection that represents all the built-in document
properties of the workbook.
|
java.util.Locale |
getCulture()
Gets culture info for the workbook.
|
ICustomDocumentPropertyCollection |
getCustomDocumentProperties()
Gets a collection that represents all the custom document
properties of the workbook.
|
ICustomViews |
getCustomViews()
Gets the custom views of the workbook.
|
java.lang.String |
getDefaultTableStyle()
Gets the table style name from the
ITableStyleCollection collection
that is used as the default TableStyle. |
boolean |
getDeferUpdateDirtyState()
Gets whether update the dirty state of the formula cells immediately when changing the value of a cell.
|
boolean |
getEnableCalculation()
Gets whether the calculation engine is valid.
|
java.util.List<java.lang.String> |
getExcelLinkSources()
Returns the names of the linked excel documents.
|
java.lang.String |
getFullName()
Returns the name of the workbook, including its path on disk.
|
IGraphicsInfo |
getGraphicsInfo()
Provides graphics information.
|
IIconSets |
getIconSets()
Filters data in a workbook based on a cell icon from the IconSets collection.
|
java.lang.String |
getName()
Gets a string value that represents the name of the workbook.
|
INames |
getNames()
Returns the
INames collection that represents all the names in the
specified workbook (including all worksheet-specific names). |
Event<EventHandler<SheetEventArgs>> |
getNewSheetEvent()
Occurs when a new sheet is created in the workbook.
|
Event<EventHandler<EventArgs>> |
getOpenedEvent()
Occurs when the workbook is opened.
|
IExcelOptions |
getOptions()
Returns the
IExcelOptions object that represents some settings to control workbook behavior. |
java.lang.String |
getPath()
Gets a string that represents the path to the workbook file that this workbook object represents.
|
IPivotCaches |
getPivotCaches()
Returns the
IPivotCaches collection that represents all the
IPivotTable caches in the specified workbook. |
boolean |
getProtectStructure()
True if the order of the sheets in the workbook is protected.
|
boolean |
getProtectWindows()
True if the windows of the workbook are protected.
|
ReferenceStyle |
getReferenceStyle()
Gets the reference style.
|
boolean |
getResetAdjacentRangeBorder()
Determines whether to reset adjacent range's border when setting border for a range.
|
IWorksheets |
getSelectedSheets()
Returns a
IWorksheets collection
that represents all the selected sheets in the specified workbook. |
Event<EventHandler<SheetEventArgs>> |
getSheetActivateEvent()
Occurs when a sheet is activate.
|
Event<EventHandler<SheetEventArgs>> |
getSheetBeforeDeleteEvent()
Occurs before a sheet is deleted.
|
Event<EventHandler<RangeEventArgs>> |
getSheetChangeEvent()
Occurs when something changes in the cells of a sheet.
|
Event<EventHandler<SheetEventArgs>> |
getSheetDeactivateEvent()
Occurs when a sheet is deactivated.
|
Event<EventHandler<RangeEventArgs>> |
getSheetSelectionChange()
Occurs when the selection changes on a sheet.
|
ISignatureSet |
getSignatures()
Gets a collection of Signature objects that correspond to
the digital signature attached to a document.
|
ISlicerCaches |
getSlicerCaches()
Gets the
ISlicerCaches object associated with the workbook. |
IStyleCollection |
getStyles()
Returns the
IStyleCollection collection that represents all the
styles in the specified workbook. |
ITableStyleCollection |
getTableStyles()
Returns the
ITableStyleCollection collection object for the current
workbook that refers to the styles used in the current workbook. |
ITheme |
getTheme()
Returns the theme applied to the current workbook.
|
java.util.List<FontInfo> |
getUsedFonts()
Gets all fonts information that used on workbook.
|
IWorksheets |
getWorksheets()
Returns the
IWorksheets collection that represents all the worksheets
in the specified workbook. |
WriteProtection |
getWriteProtection()
Returns a
WriteProtection object that provides access to the workbook write protection options. |
boolean |
isEncryptedFile(java.io.InputStream fileStream)
Specifies whether the file is password protected.
|
boolean |
isEncryptedFile(java.lang.String fileName)
Specifies whether the file is password protected.
|
void |
open(java.io.InputStream fileStream)
Opens the specified excel file stream.
|
void |
open(java.io.InputStream fileStream,
OpenFileFormat fileFormat)
Opens the specified format file stream.
|
void |
open(java.io.InputStream fileStream,
OpenOptionsBase options)
Opens the stream with specified options, the open options can be
XlsxOpenOptions, CsvOpenOptions.
|
void |
open(java.io.InputStream fileStream,
java.lang.String password)
Opens the specified excel file stream.
|
void |
open(java.lang.String fileName)
Opens the specified excel file
|
java.util.List<JsonError> |
open(java.lang.String fileName,
DeserializationOptions deserializationOptions)
Opens the json file.
|
void |
open(java.lang.String fileName,
OpenFileFormat fileFormat)
Opens the specified format file.
|
void |
open(java.lang.String fileName,
OpenOptionsBase options)
Opens the file with specified options, the open options can be
XlsxOpenOptions, CSVOpenOptions.
|
void |
open(java.lang.String fileName,
java.lang.String password)
Opens the specified excel file
|
void |
processTemplate()
Start to process the template
|
void |
protect()
Protects a workbook so that it cannot be modified.
|
void |
protect(boolean structure)
Protects a workbook so that it cannot be modified.
|
void |
protect(boolean structure,
boolean windows)
Protects a workbook so that it cannot be modified.
|
void |
protect(java.lang.String password)
Protects a workbook so that it cannot be modified.
|
void |
protect(java.lang.String password,
boolean structure)
Protects a workbook so that it cannot be modified.
|
void |
protect(java.lang.String password,
boolean structure,
boolean windows)
Protects a workbook so that it cannot be modified.
|
void |
save(java.io.OutputStream outputStream)
Saves the workbook to the stream.
|
void |
save(java.io.OutputStream fileStream,
SaveFileFormat fileFormat)
Saves the specified format file stream.
|
void |
save(java.io.OutputStream fileStream,
SaveOptionsBase options)
Saves workbook to stream with specified options.
|
void |
save(java.io.OutputStream outputStream,
java.lang.String password)
Saves data to the specified excel file stream.
|
void |
save(java.lang.String fileName)
Saves the workbook to the disk.
|
void |
save(java.lang.String fileName,
SaveFileFormat fileFormat)
Saves the specified format file.
|
void |
save(java.lang.String fileName,
SaveOptionsBase options)
Saves workbook to file with specified options.
|
void |
save(java.lang.String fileName,
java.lang.String password)
Saves data to the specified excel file.
|
void |
setAllowDynamicArray(boolean value)
Deprecated.
|
void |
setAuthor(java.lang.String value)
Sets the author.
|
void |
setAutoParse(boolean value)
Sets whether to automatically parse when setting a range value to a string
value.
|
void |
setAutoRoundValue(boolean value)
Sets whether to round the number to 15 significant figures when getting the value.
|
void |
setCulture(java.util.Locale value)
Sets culture info for the workbook.
|
void |
setDefaultTableStyle(java.lang.String value)
Sets the table style name from the
ITableStyleCollection collection
that is used as the default TableStyle. |
void |
setDeferUpdateDirtyState(boolean value)
Sets whether update the dirty state of the formula cells immediately when changing the value of a cell.
|
void |
setEnableCalculation(boolean value)
Sets whether the calculation engine is valid.
|
void |
setGraphicsInfo(IGraphicsInfo value)
Provides graphics information.
|
void |
setName(java.lang.String name)
Sets a string value that represents the name of the workbook.
|
void |
setPath(java.lang.String path)
Sets a string that represents the path to the workbook file that this workbook object represents.
|
void |
setReferenceStyle(ReferenceStyle value)
Sets the reference style.
|
void |
setResetAdjacentRangeBorder(boolean value)
Determines whether to reset adjacent range's border when setting border for a range.
|
void |
setTheme(ITheme value)
Sets the theme applied to the current workbook.
|
java.lang.String |
toJson()
Generates a json string from a workbook.
|
void |
toJson(java.io.OutputStream stream)
Generates a json stream from a workbook.
|
void |
toJson(java.io.OutputStream stream,
SerializationOptions serializationOptions)
Generates a json stream from a workbook.
|
java.lang.String |
toJson(SerializationOptions serializationOptions)
Generates a json string from the workbook.
|
void |
unprotect()
Removes protection from the workbook.
|
void |
unprotect(java.lang.String password)
Removes protection from the workbook.
|
void |
updateExcelLink(java.lang.String name)
Updates a excel link.
|
void |
updateExcelLink(java.lang.String name,
IWorkbook sourceWorkbook)
Updates a excel link.
|
void |
updateExcelLinks()
Updates all the excel links.
|
Event<EventHandler<EventArgs>> getAfterSaveEvent()
Event<EventHandler<EventArgs>> getBeforeSaveEvent()
Event<EventHandler<SheetEventArgs>> getNewSheetEvent()
Event<EventHandler<EventArgs>> getOpenedEvent()
Event<EventHandler<SheetEventArgs>> getSheetActivateEvent()
Event<EventHandler<SheetEventArgs>> getSheetBeforeDeleteEvent()
Event<EventHandler<RangeEventArgs>> getSheetChangeEvent()
Event<EventHandler<SheetEventArgs>> getSheetDeactivateEvent()
Event<EventHandler<RangeEventArgs>> getSheetSelectionChange()
@Deprecated boolean getAllowDynamicArray()
@Deprecated void setAllowDynamicArray(boolean value)
boolean getDeferUpdateDirtyState()
void setDeferUpdateDirtyState(boolean value)
java.lang.String getName()
void setName(java.lang.String name)
java.lang.String getFullName()
java.lang.String getPath()
void setPath(java.lang.String path)
IWorksheets getSelectedSheets()
IWorksheets collection
that represents all the selected sheets in the specified workbook.IExcelOptions getOptions()
IExcelOptions object that represents some settings to control workbook behavior.boolean getResetAdjacentRangeBorder()
void setResetAdjacentRangeBorder(boolean value)
value - boolean getAutoParse()
void setAutoParse(boolean value)
boolean getAutoRoundValue()
void setAutoRoundValue(boolean value)
IWorkbookView getBookView()
boolean getProtectStructure()
boolean getProtectWindows()
ISignatureSet getSignatures()
IBuiltInDocumentPropertyCollection getBuiltInDocumentProperties()
ICustomDocumentPropertyCollection getCustomDocumentProperties()
ICustomViews getCustomViews()
WriteProtection getWriteProtection()
WriteProtection object that provides access to the workbook write protection options.boolean getEnableCalculation()
void setEnableCalculation(boolean value)
java.util.Locale getCulture()
void setCulture(java.util.Locale value)
java.lang.String getDefaultTableStyle()
ITableStyleCollection collection
that is used as the default TableStyle.void setDefaultTableStyle(java.lang.String value)
ITableStyleCollection collection
that is used as the default TableStyle.INames getNames()
INames collection that represents all the names in the
specified workbook (including all worksheet-specific names).java.lang.String getAuthor()
void setAuthor(java.lang.String value)
IPivotCaches getPivotCaches()
IPivotCaches collection that represents all the
IPivotTable caches in the specified workbook.ReferenceStyle getReferenceStyle()
void setReferenceStyle(ReferenceStyle value)
IStyleCollection getStyles()
IStyleCollection collection that represents all the
styles in the specified workbook.ITableStyleCollection getTableStyles()
ITableStyleCollection collection object for the current
workbook that refers to the styles used in the current workbook.ITheme getTheme()
void setTheme(ITheme value)
IIconSets getIconSets()
IWorksheets getWorksheets()
IWorksheets collection that represents all the worksheets
in the specified workbook. This is a read-only Sheets object.IWorksheet getActiveSheet()
ISlicerCaches getSlicerCaches()
ISlicerCaches object associated with the workbook.void calculate()
void dirty()
java.util.List<JsonError> fromJson(java.lang.String json)
json - the json.java.util.List<JsonError> fromJson(java.lang.String json, DeserializationOptions deserializationOptions)
json - the json.deserializationOptions - the DeserializationOptions object.java.util.List<JsonError> fromJson(java.io.InputStream stream)
stream - the streamjava.util.List<JsonError> fromJson(java.io.InputStream stream, DeserializationOptions deserializationOptions)
stream - the streamdeserializationOptions - the DeserializationOptions object.java.lang.String toJson()
java.lang.String toJson(SerializationOptions serializationOptions)
serializationOptions - the SerializationOptions object.void toJson(java.io.OutputStream stream)
stream - the output stream.void toJson(java.io.OutputStream stream,
SerializationOptions serializationOptions)
stream - the output stream.serializationOptions - the SerializationOptions object.boolean isEncryptedFile(java.lang.String fileName)
fileName - the file name.boolean isEncryptedFile(java.io.InputStream fileStream)
fileStream - the input file stream.void open(java.lang.String fileName)
fileName - The excel file.java.util.List<JsonError> open(java.lang.String fileName, DeserializationOptions deserializationOptions)
fileName - The specified json file.deserializationOptions - The json deserialization options.void open(java.lang.String fileName,
java.lang.String password)
fileName - The excel file.password - The password of the file.void open(java.lang.String fileName,
OpenOptionsBase options)
fileName - The excel file.options - The options of opening the file.void open(java.lang.String fileName,
OpenFileFormat fileFormat)
fileName - The specified file.fileFormat - The format of the file.void open(java.io.InputStream fileStream)
fileStream - The file stream.void open(java.io.InputStream fileStream,
java.lang.String password)
fileStream - The file stream.password - The password of the file.void open(java.io.InputStream fileStream,
OpenOptionsBase options)
fileStream - The file stream.options - The format of opening the file stream.void open(java.io.InputStream fileStream,
OpenFileFormat fileFormat)
fileStream - The specified file stream.fileFormat - The format of the file stream.void save(java.lang.String fileName)
fileName - The file name.void save(java.lang.String fileName,
java.lang.String password)
fileName - The excel file.password - The password of the file.void save(java.lang.String fileName,
SaveOptionsBase options)
fileName - The specified file.options - The options of saving the file.void save(java.lang.String fileName,
SaveFileFormat fileFormat)
fileName - The specified file.fileFormat - The format of the file.void save(java.io.OutputStream outputStream)
outputStream - The file stream.void save(java.io.OutputStream outputStream,
java.lang.String password)
outputStream - The file stream.password - The password of the file.void save(java.io.OutputStream fileStream,
SaveOptionsBase options)
fileStream - The specified file stream.options - The options of saving the file stream.void save(java.io.OutputStream fileStream,
SaveFileFormat fileFormat)
fileStream - The specified file stream.fileFormat - The format of the file stream.java.util.List<FontInfo> getUsedFonts()
void protect()
void protect(boolean structure)
structure - True to protect the structure of the workbook (To prevent other users from viewing hidden worksheets, adding, moving, deleting, or hiding worksheets, and renaming worksheets).void protect(boolean structure,
boolean windows)
structure - True to protect the structure of the workbook (To prevent other users from viewing hidden worksheets, adding, moving, deleting, or hiding worksheets, and renaming worksheets).windows - True to prevent users from moving, resizing, or closing the workbook window, or hide/unhide windows. This option is available only in Excel 2007, Excel 2010, Excel for Mac 2011, and Excel 2016 for Mac.void protect(java.lang.String password)
password - Password to protect the workbook.void protect(java.lang.String password,
boolean structure)
password - Password to protect the workbook.structure - True to protect the structure of the workbook (To prevent other users from viewing hidden worksheets, adding, moving, deleting, or hiding worksheets, and renaming worksheets).void protect(java.lang.String password,
boolean structure,
boolean windows)
password - Password to protect the workbook.structure - True to protect the structure of the workbook (To prevent other users from viewing hidden worksheets, adding, moving, deleting, or hiding worksheets, and renaming worksheets).windows - True to prevent users from moving, resizing, or closing the workbook window, or hide/unhide windows. This option is available only in Excel 2007, Excel 2010, Excel for Mac 2011, and Excel 2016 for Mac.void unprotect()
void unprotect(java.lang.String password)
password - Password to protect the workbook.void addDataSource(java.lang.String name,
java.lang.Object dataSource)
name - : the alias name of the data sourcedataSource: - Can be object of ResultSet, Custom object and variablevoid processTemplate()
IGraphicsInfo getGraphicsInfo()
void setGraphicsInfo(IGraphicsInfo value)
java.util.List<java.lang.String> getExcelLinkSources()
void updateExcelLink(java.lang.String name)
void updateExcelLink(java.lang.String name,
IWorkbook sourceWorkbook)
void updateExcelLinks()