Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hssf.converter
Class ExcelToHtmlConverter

    java.lang.Object
      org.apache.poi.hssf.converter.AbstractExcelConverter
          org.apache.poi.hssf.converter.ExcelToHtmlConverter

    public class ExcelToHtmlConverter

extends AbstractExcelConverter

Converts xls files (97-2007) to HTML file.

Author:
  Sergey Vladimirov (vlsergey {at} gmail {dot} com)

Constructor Summary
`ExcelToHtmlConverter(org.w3c.dom.Document doc)`
`ExcelToHtmlConverter(HtmlDocumentFacade htmlDocumentFacade)`

Method Summary
`java.lang.String` | `getCssClassPrefixCell()`
`java.lang.String` | `getCssClassPrefixDiv()`
`java.lang.String` | `getCssClassPrefixRow()`
`java.lang.String` | `getCssClassPrefixTable()`
`org.w3c.dom.Document` | `getDocument()`
`boolean` | `isUseDivsToSpan()`
`static void` | `main(java.lang.String[] args)` Java main() interface to interact with `ExcelToHtmlConverter`
`static org.w3c.dom.Document` | `process(java.io.File xlsFile)` Converts Excel file (97-2007) into HTML file.
`void` | `processWorkbook(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)`
`void` | `setCssClassPrefixCell(java.lang.String cssClassPrefixCell)`
`void` | `setCssClassPrefixDiv(java.lang.String cssClassPrefixDiv)`
`void` | `setCssClassPrefixRow(java.lang.String cssClassPrefixRow)`
`void` | `setCssClassPrefixTable(java.lang.String cssClassPrefixTable)`
`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).

Methods inherited from class org.apache.poi.hssf.converter.AbstractExcelConverter
`getFontReplacer, isOutputColumnHeaders, isOutputHiddenColumns, isOutputHiddenRows, isOutputLeadingSpacesAsNonBreaking, isOutputRowNumbers, setFontReplacer, setOutputColumnHeaders, setOutputHiddenColumns, setOutputHiddenRows, setOutputLeadingSpacesAsNonBreaking, setOutputRowNumbers`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExcelToHtmlConverter

    public ExcelToHtmlConverter(org.w3c.dom.Document doc)

### ExcelToHtmlConverter

    public ExcelToHtmlConverter(HtmlDocumentFacade htmlDocumentFacade)

Method Detail

### main

    public static void main(java.lang.String[] args)

  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

### process

    public static org.w3c.dom.Document process(java.io.File xlsFile)
                                        throws java.lang.Exception

  Converts Excel file (97-2007) into HTML file.

  Parameters:
    `xlsFile` - file to process
  Returns:
    DOM representation of result HTML
  Throws:
    `java.lang.Exception`

### getCssClassPrefixCell

    public java.lang.String getCssClassPrefixCell()

### getCssClassPrefixDiv

    public java.lang.String getCssClassPrefixDiv()

### getCssClassPrefixRow

    public java.lang.String getCssClassPrefixRow()

### getCssClassPrefixTable

    public java.lang.String getCssClassPrefixTable()

### getDocument

    public org.w3c.dom.Document getDocument()

### isUseDivsToSpan

    public boolean isUseDivsToSpan()

### processWorkbook

    public void processWorkbook(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)

### setCssClassPrefixCell

    public void setCssClassPrefixCell(java.lang.String cssClassPrefixCell)

### setCssClassPrefixDiv

    public void setCssClassPrefixDiv(java.lang.String cssClassPrefixDiv)

### setCssClassPrefixRow

    public void setCssClassPrefixRow(java.lang.String cssClassPrefixRow)

### setCssClassPrefixTable

    public void setCssClassPrefixTable(java.lang.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD