Class ExcelSheetWriter
- java.lang.Object
-
- com.xebialabs.xlrelease.reports.excel.ExcelSheetWriter
-
public class ExcelSheetWriter extends java.lang.ObjectThis is an abstraction of the actual excel writer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.IntegerMAXIMUM_CELL_LENGTHstatic org.joda.time.format.PeriodFormatterPERIOD_FORMATTER
-
Constructor Summary
Constructors Constructor Description ExcelSheetWriter(ReportWorkbook reportWorkbook, org.apache.poi.xssf.usermodel.XSSFSheet sheet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExcelSheetWriteraddBottomBorderToCell(org.apache.poi.xssf.usermodel.XSSFCell cell)ExcelSheetWriteraddCell(java.lang.Integer entry, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddCell(java.lang.Object entry)protected ExcelSheetWriteraddCell(java.lang.Object entry, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddCell(java.lang.String text)ExcelSheetWriteraddCell(java.lang.String text, java.awt.Color color)ExcelSheetWriteraddCell(java.lang.String text, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddCell(java.util.Date date)ExcelSheetWriteraddCell(java.util.Date date, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddCell(org.apache.poi.xssf.usermodel.XSSFRichTextString text, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddCell(org.joda.time.Duration duration)ExcelSheetWriteraddEmptyCell(org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddFullText(java.lang.String text)ExcelSheetWriteraddHeaderCell(com.xebialabs.xlrelease.reports.excel.ExcelHeaderColumn header)ExcelSheetWriteraddHeaderCell(com.xebialabs.xlrelease.reports.excel.ExcelHeaderColumn header, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddHeaderCell(java.lang.String text, int width)ExcelSheetWriteraddHeaderCell(java.lang.String text, int width, org.apache.poi.xssf.usermodel.XSSFCellStyle style)ExcelSheetWriteraddHeaderFilter(int numberOfColumns)ExcelSheetWriteraddHeaderFilter(int numberOfColumns, boolean freezePane)ExcelSheetWriteraddHyperlink(java.lang.String text, java.lang.String url, org.apache.poi.common.usermodel.HyperlinkType type, org.apache.poi.xssf.usermodel.XSSFCellStyle hyperlinkStyle)ExcelSheetWriteraddHyperlink(java.lang.String text, java.lang.String url, org.apache.poi.xssf.usermodel.XSSFCellStyle hyperlinkStyle)protected ExcelSheetWriteraddProperty(java.lang.String key, java.lang.String value)ExcelSheetWriterapplyPhaseColor(com.xebialabs.xlrelease.domain.Phase phase)protected ExcelSheetWriterendGroup()intgetColumnIndex()org.apache.poi.xssf.usermodel.XSSFCellStylegetDateStyle()org.apache.poi.xssf.usermodel.XSSFCellStylegetDefaultStyle()ReportWorkbookgetReportWorkbook()intgetRowIndex()org.apache.poi.xssf.usermodel.XSSFSheetgetSheet()org.apache.poi.xssf.usermodel.XSSFWorkbookgetWorkbook()ExcelSheetWritergoToStartOfLine()ExcelSheetWriterindent()ExcelSheetWriterinsertImage(java.net.URL imageResource, int rowIndex, int colIndex, int magicWidth, int magicHeight)booleanisPhaseRow()booleanisWrappedRow()ExcelSheetWritermergeCells(org.apache.poi.ss.util.CellRangeAddress range)ExcelSheetWriternewColumn()ExcelSheetWriternewRow()ExcelSheetWriterreplaceWithHyperlink(int srcRow, int srcCol, java.lang.String targetSheet, int targetRow, int targetCol, org.apache.poi.xssf.usermodel.XSSFCellStyle hyperlinkStyle)ExcelSheetWritersetCellHyperlink(org.apache.poi.xssf.usermodel.XSSFHyperlink hyperlink)voidsetPhaseRow(boolean isPhaseRow)ExcelSheetWritersetRowHeight(float points)voidsetWrappedRow(boolean wrapped)protected ExcelSheetWriterstartGroup()static java.lang.Stringtruncate(java.lang.String text)
-
-
-
Constructor Detail
-
ExcelSheetWriter
public ExcelSheetWriter(ReportWorkbook reportWorkbook, org.apache.poi.xssf.usermodel.XSSFSheet sheet)
-
-
Method Detail
-
newRow
public ExcelSheetWriter newRow()
-
setRowHeight
public ExcelSheetWriter setRowHeight(float points)
-
indent
public ExcelSheetWriter indent()
-
goToStartOfLine
public ExcelSheetWriter goToStartOfLine()
-
newColumn
public ExcelSheetWriter newColumn()
-
addHeaderCell
public ExcelSheetWriter addHeaderCell(java.lang.String text, int width)
-
addHeaderCell
public ExcelSheetWriter addHeaderCell(com.xebialabs.xlrelease.reports.excel.ExcelHeaderColumn header)
-
addHeaderCell
public ExcelSheetWriter addHeaderCell(com.xebialabs.xlrelease.reports.excel.ExcelHeaderColumn header, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addHeaderCell
public ExcelSheetWriter addHeaderCell(java.lang.String text, int width, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addCell
public ExcelSheetWriter addCell(java.lang.Object entry)
-
addCell
protected ExcelSheetWriter addCell(java.lang.Object entry, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addCell
public ExcelSheetWriter addCell(java.lang.Integer entry, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addCell
public ExcelSheetWriter addCell(java.lang.String text, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addCell
public ExcelSheetWriter addCell(java.lang.String text)
-
setCellHyperlink
public ExcelSheetWriter setCellHyperlink(org.apache.poi.xssf.usermodel.XSSFHyperlink hyperlink)
-
addCell
public ExcelSheetWriter addCell(org.apache.poi.xssf.usermodel.XSSFRichTextString text, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addCell
public ExcelSheetWriter addCell(java.util.Date date, org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addCell
public ExcelSheetWriter addCell(java.util.Date date)
-
addCell
public ExcelSheetWriter addCell(org.joda.time.Duration duration)
-
addCell
public ExcelSheetWriter addCell(java.lang.String text, java.awt.Color color)
-
addEmptyCell
public ExcelSheetWriter addEmptyCell(org.apache.poi.xssf.usermodel.XSSFCellStyle style)
-
addHyperlink
public ExcelSheetWriter addHyperlink(java.lang.String text, java.lang.String url, org.apache.poi.xssf.usermodel.XSSFCellStyle hyperlinkStyle)
-
addHyperlink
public ExcelSheetWriter addHyperlink(java.lang.String text, java.lang.String url, org.apache.poi.common.usermodel.HyperlinkType type, org.apache.poi.xssf.usermodel.XSSFCellStyle hyperlinkStyle)
-
addFullText
public ExcelSheetWriter addFullText(java.lang.String text)
-
addProperty
protected ExcelSheetWriter addProperty(java.lang.String key, java.lang.String value)
-
mergeCells
public ExcelSheetWriter mergeCells(org.apache.poi.ss.util.CellRangeAddress range)
-
applyPhaseColor
public ExcelSheetWriter applyPhaseColor(com.xebialabs.xlrelease.domain.Phase phase)
-
startGroup
protected ExcelSheetWriter startGroup()
-
endGroup
protected ExcelSheetWriter endGroup()
-
addHeaderFilter
public ExcelSheetWriter addHeaderFilter(int numberOfColumns, boolean freezePane)
-
addHeaderFilter
public ExcelSheetWriter addHeaderFilter(int numberOfColumns)
-
getDefaultStyle
public org.apache.poi.xssf.usermodel.XSSFCellStyle getDefaultStyle()
-
getDateStyle
public org.apache.poi.xssf.usermodel.XSSFCellStyle getDateStyle()
-
insertImage
public ExcelSheetWriter insertImage(java.net.URL imageResource, int rowIndex, int colIndex, int magicWidth, int magicHeight)
-
replaceWithHyperlink
public ExcelSheetWriter replaceWithHyperlink(int srcRow, int srcCol, java.lang.String targetSheet, int targetRow, int targetCol, org.apache.poi.xssf.usermodel.XSSFCellStyle hyperlinkStyle)
-
addBottomBorderToCell
public ExcelSheetWriter addBottomBorderToCell(org.apache.poi.xssf.usermodel.XSSFCell cell)
-
getWorkbook
public org.apache.poi.xssf.usermodel.XSSFWorkbook getWorkbook()
-
getSheet
public org.apache.poi.xssf.usermodel.XSSFSheet getSheet()
-
getRowIndex
public int getRowIndex()
-
getColumnIndex
public int getColumnIndex()
-
isWrappedRow
public boolean isWrappedRow()
-
setWrappedRow
public void setWrappedRow(boolean wrapped)
-
isPhaseRow
public boolean isPhaseRow()
-
setPhaseRow
public void setPhaseRow(boolean isPhaseRow)
-
getReportWorkbook
public ReportWorkbook getReportWorkbook()
-
truncate
public static java.lang.String truncate(java.lang.String text)
-
-