|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQExcelWriter
This interface facilitates writing Excel spreadsheet files.
This writer constructs an in-memory spreadsheet which can be written to the disk by saveToFile() method or converted to a byte array via saveToByteArray().
Method Summary | |
---|---|
void |
close()
Closes this writer and releases any system resources associated with it. |
void |
insertPivotTable(AQPivotDataSet dataSet)
Inserts a new worksheet containing pivot table from the specified data set. |
byte[] |
saveToByteArray()
Saves the spreadsheet to a byte array. |
void |
saveToFile(String filename)
Save the spreadsheet to a file. |
void |
setAutoResize(boolean on)
Controls whether the columns will be resized to fit the data. |
void |
setColumnWidth(int columnIndex,
float width)
Sets the width of the specified column, in unit of characters using default font. |
void |
setCurrentWorksheet(String name)
Sets the current worksheet. |
void |
setFirstLineContainsColumnNames(boolean on)
Defines whether the first data row is preceded by a row containing column names. |
void |
setNullString(String s)
Sets value to be placed in a cell containing null data. |
void |
skip()
Skips one line in the output file. |
void |
skip(int numberOfLines)
Skips specified number of lines in the output file. |
Methods inherited from interface com.aquafold.openapi.io.AQDataWriter |
---|
write, write, write, write |
Method Detail |
---|
void setCurrentWorksheet(String name)
name
- Worksheet name.void setFirstLineContainsColumnNames(boolean on)
void setNullString(String s)
s
- String value to be inserted in place of a null.void skip()
void skip(int numberOfLines)
numberOfLines
- Number of lines to skip.void setColumnWidth(int columnIndex, float width)
columnIndex
- Column index, 0-based.width
- Column width in characters(0-255).void setAutoResize(boolean on)
setColumnWidth(int, float)
.
This method may be called before any data is written. An exception will be thrown if
this method is invoked after data has been written.
on
- void insertPivotTable(AQPivotDataSet dataSet) throws Exception
dataSet
-
Exception
byte[] saveToByteArray() throws Exception
Exception
void saveToFile(String filename) throws Exception
filename
- Output file name.
Exception
void close() throws IOException
close
in interface AQDataWriter
close
in interface Closeable
IOException
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |