Class ExcelWriter
java.lang.Object
com.compomics.util.io.export.ExportWriter
com.compomics.util.io.export.writers.ExcelWriter
ExportWriter for the export to Excel files.
- Author:
- Marc Vaudel
-
Field Summary
Fields inherited from class com.compomics.util.io.export.ExportWriter
exportFormat, LAST_FOLDER_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSeparator(WorkbookStyle textStyle) Adds a separator.voidclose()Writes the content in cache and closes the connection to the file.voidNotifies the writer that data of a lower hierarchical depth will be written, e.g.org.apache.poi.hssf.usermodel.HSSFWorkbookReturn the workBook.Returns the workbook style.voidNotifies the writer that data of a higher hierarchical depth will be written, e.g.voidnewLine()Adds a separator.voidsetWorkbookStyle(WorkbookStyle workbookStyle) Sets the workbook style.voidstartNewSection(String sectionTitle, WorkbookStyle textStyle) Starts a new section.voidwrite(String text, WorkbookStyle textStyle) Writes text to the export.voidwriteHeaderText(String text, WorkbookStyle textStyle) Writes header text to the export.voidwriteMainTitle(String text, WorkbookStyle textStyle) Writes the main title.Methods inherited from class com.compomics.util.io.export.ExportWriter
addSeparator, getExportFormat, getExportWriter, startNewSection, startNewSection, write, writeHeaderText, writeMainTitle
-
Constructor Details
-
ExcelWriter
public ExcelWriter()Empty default constructor. -
ExcelWriter
Constructor.- Parameters:
destinationFile- the file where to write the data
-
-
Method Details
-
getWorkbookStyle
Returns the workbook style.- Returns:
- the workbook style
-
setWorkbookStyle
Sets the workbook style.- Parameters:
workbookStyle- the workbook style
-
getWorkbook
public org.apache.poi.hssf.usermodel.HSSFWorkbook getWorkbook()Return the workBook.- Returns:
- the workBook
-
write
Description copied from class:ExportWriterWrites text to the export.- Specified by:
writein classExportWriter- Parameters:
text- the text to writetextStyle- the style to use, overwrites any previous/default- Throws:
IOException- if an IOException occurs
-
writeMainTitle
Description copied from class:ExportWriterWrites the main title.- Specified by:
writeMainTitlein classExportWriter- Parameters:
text- the text to writetextStyle- the style to use, overwrites any previous/default- Throws:
IOException- if an IOException occurs
-
startNewSection
Description copied from class:ExportWriterStarts a new section.- Specified by:
startNewSectionin classExportWriter- Parameters:
sectionTitle- the text to writetextStyle- the style to use, overwrites any previous/default- Throws:
IOException- if an IOException occurs
-
writeHeaderText
Description copied from class:ExportWriterWrites header text to the export.- Specified by:
writeHeaderTextin classExportWriter- Parameters:
text- the text to writetextStyle- the style to use, overwrites any previous/default- Throws:
IOException- if an IOException occurs
-
addSeparator
Description copied from class:ExportWriterAdds a separator.- Specified by:
addSeparatorin classExportWriter- Parameters:
textStyle- the style to use, overwrites any previous/default- Throws:
IOException- if an IOException occurs
-
newLine
Description copied from class:ExportWriterAdds a separator.- Specified by:
newLinein classExportWriter- Throws:
IOException- if an IOException occurs
-
close
Description copied from class:ExportWriterWrites the content in cache and closes the connection to the file.- Specified by:
closein classExportWriter- Throws:
IOException- if an IOException occursFileNotFoundException- if a FileNotFoundException occurs
-
increaseDepth
public void increaseDepth()Description copied from class:ExportWriterNotifies the writer that data of a higher hierarchical depth will be written, e.g. going from protein to peptide.- Specified by:
increaseDepthin classExportWriter
-
decreaseDepth
public void decreaseDepth()Description copied from class:ExportWriterNotifies the writer that data of a lower hierarchical depth will be written, e.g. going from peptide to protein.- Specified by:
decreaseDepthin classExportWriter
-