public interface IWorkbook
Modifier and Type | Method and Description |
---|---|
IWorksheet |
add()
Create and add worksheet to the workbook
|
IWorksheet |
addCopy(int originId)
Copy existing worksheet and add to the workbook
|
Stream<IWorksheet> |
all() |
Optional<IWorksheet> |
find(int id)
Searches a worksheet by the ID
|
Optional<IWorksheet> |
find(String name)
Searches a worksheet by the name
|
IEventManager |
getEventManager() |
IWorksheet |
getFirst() |
IScellApiResolver |
getResolver() |
ISearchService |
getSearchService() |
IFileWriter |
getWriter() |
Boolean |
remove(int id)
Remove worksheet
|
IWorksheet |
removeAll()
Remove all worksheets and adds a new one (because of workbook must contain at least one worksheet)
|
void |
setProtection(IPasswordInput passwordHandler)
Protect or unprotect (when the param is null) current document.
|
IFileWriter getWriter()
IFileWriter
to save or convert the xlsxIWorksheet add()
IWorksheet
IWorksheet addCopy(int originId)
originId
- worksheet id to be copiedIWorksheet
Boolean remove(int id)
id
- worksheet id to be removedLastVisibleWorksheetDeleteException
- if there is no other visible worksheetsIWorksheet removeAll()
IWorksheet
ISearchService getSearchService()
ISearchService
to find any content on WorkbookIWorksheet getFirst()
IWorksheet
from this workbookOptional<IWorksheet> find(int id)
id
- ID of needed worksheet (integer)IWorksheet
or Optional.empty()
Optional<IWorksheet> find(String name)
name
- name of needed worksheetIWorksheet
or Optional.empty()Stream<IWorksheet> all()
IWorksheet
IEventManager getEventManager()
IEventManager
to manage all internal eventsIScellApiResolver getResolver()
IScellApiResolver
for conveniencevoid setProtection(IPasswordInput passwordHandler)
passwordHandler
- password supplier. To remove existing protection set it to nullCopyright © 2023. All rights reserved.