public interface AQExcelSpreadsheet
Modifier and Type | Method and Description |
---|---|
void |
addWorksheet(String name)
Adds a sheet with the given name.
|
void |
clear()
Clears the spreadsheet.
|
void |
clearCurrentWorksheet()
Clears the current worksheet.
|
int |
getColumn()
Returns the current column (0-based).
|
String |
getCurrentWorksheet()
Returns the current worksheet name.
|
int |
getRow()
Returns the current row (0-based).
|
String[] |
getWorksheetNames()
Returns worksheet names in an array.
|
void |
insert(AQDataReader reader,
boolean firstLineContainsColumnNames)
Inserts the data read from the specified reader into the current worksheet,
starting with the current row and column.
|
void |
insert(AQDataRow dataRow)
Inserts the row of values into the current worksheet,
starting with the current row and column.
|
void |
insert(AQDataSet dataSet,
boolean firstLineContainsColumnNames)
Inserts the data set into the current worksheet,
starting with the current row and column.
|
void |
insertPivotTable(AQPivotDataSet pivotDataSet)
Creates a new worksheet with the pivot data set inserted.
|
void |
nextRow()
Advances current row by one.
|
void |
removeWorksheet(int index)
Removes a worksheet at the specified index.
|
void |
save()
Saves the spreadsheet.
|
void |
save(String filename)
Saves the spreadsheet to a new file.
|
void |
setAutoResize(boolean enable)
When enabled, the cell widths will be resized to fit the contents on the next save() operation.
|
void |
setCell(int row,
int column,
Object value)
Sets the cell value at the specified row and column in the current worksheet.
|
void |
setCell(int row,
int column,
Object value,
AQFont font,
AQColor backgroundColor,
AQColor foregroundColor)
Sets the cell value, font, background color and foreground color at the specified row and column in the current worksheet.
|
void |
setCell(Object value)
Sets the cell value at the current row and column in the current worksheet.
|
void |
setColumn(int column)
Sets the current column (0-based).
|
void |
setCurrentWorksheet(String name)
Sets the current worksheet.
|
void |
setRow(int row)
Sets the current row (0-based).
|
void |
setWorksheetName(int index,
String name)
Sets worksheet name.
|
void setCell(int row, int column, Object value)
row
- row indexcolumn
- column indexvalue
- cell valuevoid setCell(int row, int column, Object value, AQFont font, AQColor backgroundColor, AQColor foregroundColor)
row
- row indexcolumn
- column indexvalue
- cell valuefont
- cell font if not nullbackgroundColor
- cell background color if not nullforegroundColor
- cell foreground color if not nullvoid setCell(Object value)
value
- cell valuevoid setCurrentWorksheet(String name)
name
- worksheet nameString getCurrentWorksheet()
void setRow(int row)
row
- row indexint getRow()
void nextRow()
void setColumn(int column)
column
- column indexint getColumn()
void insertPivotTable(AQPivotDataSet pivotDataSet) throws Exception
pivotDataSet
- pivot data setException
- On errorvoid insert(AQDataSet dataSet, boolean firstLineContainsColumnNames) throws Exception
dataSet
- data setfirstLineContainsColumnNames
- When true, the first inserted line will contain column names, if defined.Exception
- On errorvoid insert(AQDataReader reader, boolean firstLineContainsColumnNames) throws Exception
reader
- readerfirstLineContainsColumnNames
- When true, the first inserted line will contain column names, if defined.Exception
- On errorvoid insert(AQDataRow dataRow)
dataRow
- data rowvoid clear()
void clearCurrentWorksheet()
void setAutoResize(boolean enable)
enable
- to turn option on/offvoid save(String filename) throws Exception
filename
- the file nameException
- On errorString[] getWorksheetNames()
void setWorksheetName(int index, String name)
index
- Worksheet index, 0-based.name
- Worksheet name.void addWorksheet(String name)
name
- Worksheet name.setCurrentWorksheet(String)
void removeWorksheet(int index)
index
- Worksheet index.
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.