public interface OdsDocument extends StylesModeSetter
| Modifier and Type | Method and Description |
|---|---|
void |
addAutoFilter(AutoFilter autoFilter)
Add a new auto filter
|
void |
addAutoFilter(String rangeName,
Table table,
int r1,
int c1,
int r2,
int c2)
Deprecated.
use
table.addAutoFilter(r1, c1, r2, c2) |
void |
addEvents(ScriptEventListener... events)
Add some events to the document
|
void |
addExtraDir(String fullPath)
Add an extra directory to the manifest.
|
void |
addExtraFile(String fullPath,
String mediaType,
byte[] bytes)
Add an extra file to the document
|
void |
addExtraObject(String fullPath,
String mediaType,
String version)
Add an extra object (eg. a spreadsheet) to the manifest.
|
void |
addPilotTable(PilotTable pilot)
Add a new pilot table
|
Table |
addTable(String name)
Add a new table to the document, the new table is set to the active table.
|
Table |
addTable(String name,
int rowCapacity,
int columnCapacity)
Add a new table to the document, the new table is set to the active table.
|
boolean |
addTable(Table table)
Add a new table to the document, the new table is set to the active table.
|
Table |
createTable(String name)
*You probably need
addTable*
Create a new table, **but do not add it to the document**. |
Table |
createTable(String name,
int rowCapacity,
int columnCapacity)
*You probably need
addTable*
Create a new table, **but do not add it to the document**. |
void |
freezeCells(Table table,
int rowCount,
int colCount) |
Table |
getOrAddTable(String name) |
Table |
getTable(int n)
Get a table by index
|
Table |
getTable(String name)
Get a table by name
|
String |
getTableName(int n)
Returns the name of the table.
|
int |
getTableNumber(String name)
Search a table by name and return its number.
|
List<Table> |
getTables() |
boolean |
setActiveTable(int tableIndex)
Set the active table, this is the table that is shown if you open the
file.
|
void |
setViewSetting(String viewId,
String item,
String value)
Set a view setting
|
int |
tableCount()
Gets the number of the last table.
|
setDataStylesMode, setMasterPageStyleMode, setObjectStyleMode, setPageLayoutStyleMode, setPageStyleModeTable addTable(String name) throws IOException
name - - The name of the table to addIOException - if the table can't be added to documentTable addTable(String name, int rowCapacity, int columnCapacity) throws IOException
name - the name of the table to addrowCapacity - the initial row capacitycolumnCapacity - the initial column capacityIOException - if the table can't be added to documentboolean addTable(Table table) throws IOException
table - the table to addIOException - if the table can't be added to documentTable createTable(String name) throws IOException
addTable*
Create a new table, **but do not add it to the document**.
name - - The name of the table to addIOException - if the table can't be added to documentTable createTable(String name, int rowCapacity, int columnCapacity) throws IOException
addTable*
Create a new table, **but do not add it to the document**.
name - - The name of the table to addrowCapacity - the initial row capacitycolumnCapacity - the initial column capacityIOException - if the table can't be added to documentTable getTable(int n) throws FastOdsException
n - the indexFastOdsException - if the table index is negative or ≥ number of tablesTable getTable(String name) throws FastOdsException
name - the name of the tableFastOdsException - if the table does not exist.Table getOrAddTable(String name) throws IOException
name - the name of the tableIOException - if the table does not exist.String getTableName(int n) throws FastOdsException
n - The number of the tableFastOdsException - if n is negativeint getTableNumber(String name)
name - The name of the tableboolean setActiveTable(int tableIndex)
tableIndex - The table number, this table should already exist, otherwise
the first table is shownvoid setViewSetting(String viewId, String item, String value)
viewId - the view iditem - the item namevalue - the valueint tableCount()
@Deprecated void addAutoFilter(String rangeName, Table table, int r1, int c1, int r2, int c2)
table.addAutoFilter(r1, c1, r2, c2)rangeName - the name of the rangetable - the tabler1 - the top rowc1 - the left columnr2 - the bottom rowc2 - the right columnvoid freezeCells(Table table, int rowCount, int colCount)
table - the tablerowCount - the number of rows to freezecolCount - the number of cols to freezevoid addExtraFile(String fullPath, String mediaType, byte[] bytes)
fullPath - the path of the file in the sequencemediaType - the MIME type of the filebytes - the contentvoid addExtraDir(String fullPath)
fullPath - the path of the dirvoid addExtraObject(String fullPath, String mediaType, String version)
fullPath - the path of the dirmediaType - the type of the objectversion - the versionvoid addEvents(ScriptEventListener... events)
events - the events to addvoid addPilotTable(PilotTable pilot)
pilot - the pilot tablevoid addAutoFilter(AutoFilter autoFilter)
autoFilter - the filterCopyright © 2016–2021. All rights reserved.