org.apache.poi.hssf.converter
Class ExcelToHtmlUtils

java.lang.Object
  extended by org.apache.poi.hssf.converter.ExcelToHtmlUtils

public class ExcelToHtmlUtils
extends java.lang.Object


Constructor Summary
ExcelToHtmlUtils()
           
 
Method Summary
static void appendAlign(java.lang.StringBuilder style, short alignment)
           
static CellRangeAddress[][] buildMergedRangesMap(HSSFSheet sheet)
          Creates a map (i.e.
static java.lang.String getBorderStyle(short xlsBorder)
           
static java.lang.String getBorderWidth(short xlsBorder)
           
static java.lang.String getColor(HSSFColor color)
           
static int getColumnWidthInPx(int widthUnits)
          See here for Xio explanation and details
static CellRangeAddress getMergedRange(CellRangeAddress[][] mergedRanges, int rowNumber, int columnNumber)
           
static HSSFWorkbook loadXls(java.io.File xlsFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelToHtmlUtils

public ExcelToHtmlUtils()
Method Detail

appendAlign

public static void appendAlign(java.lang.StringBuilder style,
                               short alignment)

buildMergedRangesMap

public static CellRangeAddress[][] buildMergedRangesMap(HSSFSheet sheet)
Creates a map (i.e. two-dimensional array) filled with ranges. Allow fast retrieving CellRangeAddress of any cell, if cell is contained in range.

See Also:
getMergedRange(CellRangeAddress[][], int, int)

getBorderStyle

public static java.lang.String getBorderStyle(short xlsBorder)

getBorderWidth

public static java.lang.String getBorderWidth(short xlsBorder)

getColor

public static java.lang.String getColor(HSSFColor color)

getColumnWidthInPx

public static int getColumnWidthInPx(int widthUnits)
See here for Xio explanation and details


getMergedRange

public static CellRangeAddress getMergedRange(CellRangeAddress[][] mergedRanges,
                                              int rowNumber,
                                              int columnNumber)
Parameters:
mergedRanges - map of sheet merged ranges built with buildMergedRangesMap(HSSFSheet)
Returns:
CellRangeAddress from map if cell with specified row and column numbers contained in found range, null otherwise

loadXls

public static HSSFWorkbook loadXls(java.io.File xlsFile)
                            throws java.io.IOException
Throws:
java.io.IOException


Copyright 2011 The Apache Software Foundation or its licensors, as applicable.