public class ExcelWriter extends ExportWriter
exportFormat, lastFolderKey| Constructor and Description |
|---|
ExcelWriter(File destinationFile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSeparator(WorkbookStyle textStyle)
Adds a separator.
|
void |
close()
Writes the content in cache and closes the connection to the file.
|
void |
decreseDepth()
Notifies the writer that data of a lower hierarchical depth will be
written, e.g.
|
org.apache.poi.hssf.usermodel.HSSFWorkbook |
getWorkbook()
Return the workBook.
|
WorkbookStyle |
getWorkbookStyle()
Returns the workbook style.
|
void |
increaseDepth()
Notifies the writer that data of a higher hierarchical depth will be
written, e.g.
|
void |
newLine()
Adds a separator.
|
void |
setWorkbookStyle(WorkbookStyle workbookStyle)
Sets the workbook style.
|
void |
startNewSection(String sectionTitle,
WorkbookStyle textStyle)
Starts a new section.
|
void |
write(String text,
WorkbookStyle textStyle)
Writes text to the export.
|
void |
writeHeaderText(String text,
WorkbookStyle textStyle)
Writes header text to the export.
|
void |
writeMainTitle(String text,
WorkbookStyle textStyle)
Writes the main title.
|
addSeparator, getExportFormat, getExportWriter, startNewSection, startNewSection, write, writeHeaderText, writeMainTitlepublic ExcelWriter(File destinationFile)
destinationFile - the file where to write the datapublic WorkbookStyle getWorkbookStyle()
public void setWorkbookStyle(WorkbookStyle workbookStyle)
workbookStyle - the workbook stylepublic org.apache.poi.hssf.usermodel.HSSFWorkbook getWorkbook()
public void write(String text, WorkbookStyle textStyle) throws IOException
ExportWriterwrite in class ExportWritertext - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void writeMainTitle(String text, WorkbookStyle textStyle) throws IOException
ExportWriterwriteMainTitle in class ExportWritertext - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void startNewSection(String sectionTitle, WorkbookStyle textStyle) throws IOException
ExportWriterstartNewSection in class ExportWritersectionTitle - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void writeHeaderText(String text, WorkbookStyle textStyle) throws IOException
ExportWriterwriteHeaderText in class ExportWritertext - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void addSeparator(WorkbookStyle textStyle) throws IOException
ExportWriteraddSeparator in class ExportWritertextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void newLine()
throws IOException
ExportWriternewLine in class ExportWriterIOException - if an IOException occurspublic void close()
throws IOException,
FileNotFoundException
ExportWriterclose in class ExportWriterIOException - if an IOException occursFileNotFoundException - if a FileNotFoundException occurspublic void increaseDepth()
ExportWriterincreaseDepth in class ExportWriterpublic void decreseDepth()
ExportWriterdecreseDepth in class ExportWriterCopyright © 2016. All rights reserved.