Class ExcelToHtmlConverter

    • Constructor Detail

      • ExcelToHtmlConverter

        public ExcelToHtmlConverter​(Document doc)
      • ExcelToHtmlConverter

        public ExcelToHtmlConverter​(HtmlDocumentFacade htmlDocumentFacade)
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws Exception
        Java main() interface to interact with ExcelToHtmlConverter

        Usage: ExcelToHtmlConverter infile outfile

        Where infile is an input .xls file ( Word 97-2007) which will be rendered as HTML into outfile
        Throws:
        Exception
      • getCssClassPrefixCell

        public String getCssClassPrefixCell()
      • getCssClassPrefixDiv

        public String getCssClassPrefixDiv()
      • getCssClassPrefixRow

        public String getCssClassPrefixRow()
      • getCssClassPrefixTable

        public String getCssClassPrefixTable()
      • isUseDivsToSpan

        public boolean isUseDivsToSpan()
      • processCell

        protected boolean processCell​(HSSFCell cell,
                                      Element tableCellElement,
                                      int normalWidthPx,
                                      int maxSpannedWidthPx,
                                      float normalHeightPt)
      • processColumnHeaders

        protected void processColumnHeaders​(HSSFSheet sheet,
                                            int maxSheetColumns,
                                            Element table)
      • processDocumentInformation

        protected void processDocumentInformation​(SummaryInformation summaryInformation)
      • processRow

        protected int processRow​(CellRangeAddress[][] mergedRanges,
                                 HSSFRow row,
                                 Element tableRowElement)
        Returns:
        maximum 1-base index of column that were rendered, zero if none
      • processRowNumber

        protected void processRowNumber​(HSSFRow row,
                                        Element tableRowNumberCellElement)
      • processSheet

        protected void processSheet​(HSSFSheet sheet)
      • processSheetHeader

        protected void processSheetHeader​(Element htmlBody,
                                          HSSFSheet sheet)
      • processWorkbook

        public void processWorkbook​(HSSFWorkbook workbook)
      • setCssClassPrefixCell

        public void setCssClassPrefixCell​(String cssClassPrefixCell)
      • setCssClassPrefixDiv

        public void setCssClassPrefixDiv​(String cssClassPrefixDiv)
      • setCssClassPrefixRow

        public void setCssClassPrefixRow​(String cssClassPrefixRow)
      • setCssClassPrefixTable

        public void setCssClassPrefixTable​(String cssClassPrefixTable)
      • setUseDivsToSpan

        public void setUseDivsToSpan​(boolean useDivsToSpan)
        Allows converter to wrap content into two additional DIVs with tricky styles, so it will wrap across empty cells (like in Excel).

        Warning: after enabling this mode do not serialize result HTML with INDENT=YES option, because line breaks will make additional (unwanted) changes