Class ExcelSheetWriter


  • public class ExcelSheetWriter
    extends java.lang.Object
    This is an abstraction of the actual excel writer
    • Field Detail

      • MAXIMUM_CELL_LENGTH

        public static final java.lang.Integer MAXIMUM_CELL_LENGTH
      • PERIOD_FORMATTER

        public static final org.joda.time.format.PeriodFormatter PERIOD_FORMATTER
    • Constructor Detail

      • ExcelSheetWriter

        public ExcelSheetWriter​(ReportWorkbook reportWorkbook,
                                org.apache.poi.xssf.usermodel.XSSFSheet sheet,
                                com.xebialabs.xlrelease.reports.excel.ExcelStyles styles)
    • Method Detail

      • 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

        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)
      • 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​(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)
      • 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)
      • 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)
      • truncate

        public static java.lang.String truncate​(java.lang.String text)