public class ExcelWriter extends ExportWriter
exportFormat
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, writeMainTitle
public 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
ExportWriter
write
in class ExportWriter
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void writeMainTitle(String text, WorkbookStyle textStyle) throws IOException
ExportWriter
writeMainTitle
in class ExportWriter
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void startNewSection(String sectionTitle, WorkbookStyle textStyle) throws IOException
ExportWriter
startNewSection
in class ExportWriter
sectionTitle
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void writeHeaderText(String text, WorkbookStyle textStyle) throws IOException
ExportWriter
writeHeaderText
in class ExportWriter
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void addSeparator(WorkbookStyle textStyle) throws IOException
ExportWriter
addSeparator
in class ExportWriter
textStyle
- the style to use, overwrites any previous/defaultIOException
public void newLine() throws IOException
ExportWriter
newLine
in class ExportWriter
IOException
public void close() throws IOException, FileNotFoundException
ExportWriter
close
in class ExportWriter
IOException
FileNotFoundException
public void increaseDepth()
ExportWriter
increaseDepth
in class ExportWriter
public void decreseDepth()
ExportWriter
decreseDepth
in class ExportWriter
Copyright © 2014. All rights reserved.