@Beta public class ExcelToFoConverter extends AbstractExcelConverter
_formatter
Constructor and Description |
---|
ExcelToFoConverter(org.w3c.dom.Document document) |
ExcelToFoConverter(FoDocumentFacade foDocumentFacade) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
createPageMaster(float tableWidthIn,
java.lang.String pageMasterName) |
protected org.w3c.dom.Document |
getDocument() |
float |
getPageMarginInches() |
protected boolean |
isEmptyStyle(CellStyle cellStyle)
Returns false if cell style by itself (without text, i.e.
|
static void |
main(java.lang.String[] args)
Java main() interface to interact with
ExcelToFoConverter |
static org.w3c.dom.Document |
process(java.io.File xlsFile)
Converts Excel file (97-2007) into XSL FO file.
|
protected boolean |
processCell(HSSFWorkbook workbook,
HSSFCell cell,
org.w3c.dom.Element tableCellElement,
int normalWidthPx,
int maxSpannedWidthPx,
float normalHeightPt) |
protected void |
processCellStyle(HSSFWorkbook workbook,
HSSFCellStyle cellStyle,
org.w3c.dom.Element cellTarget,
org.w3c.dom.Element blockTarget) |
protected void |
processCellStyleBorder(HSSFWorkbook workbook,
org.w3c.dom.Element cellTarget,
java.lang.String type,
BorderStyle xlsBorder,
short borderColor) |
protected void |
processCellStyleFont(HSSFWorkbook workbook,
org.w3c.dom.Element blockTarget,
HSSFFont font) |
protected void |
processColumnHeaders(HSSFSheet sheet,
int maxSheetColumns,
org.w3c.dom.Element table) |
protected float |
processColumnWidths(HSSFSheet sheet,
int maxSheetColumns,
org.w3c.dom.Element table)
Creates COLGROUP element with width specified for all columns.
|
protected void |
processDocumentInformation(SummaryInformation summaryInformation) |
protected int |
processRow(HSSFWorkbook workbook,
CellRangeAddress[][] mergedRanges,
HSSFRow row,
org.w3c.dom.Element tableRowElement) |
protected org.w3c.dom.Element |
processRowNumber(HSSFRow row) |
protected float |
processSheet(HSSFWorkbook workbook,
HSSFSheet sheet,
org.w3c.dom.Element flow) |
protected boolean |
processSheet(HSSFWorkbook workbook,
int sheetIndex)
Process single sheet (as specified by 0-based sheet index)
|
protected void |
processSheetName(HSSFSheet sheet,
org.w3c.dom.Element flow) |
void |
processWorkbook(HSSFWorkbook workbook) |
void |
setPageMarginInches(float pageMarginInches) |
getColumnName, getColumnWidth, getDefaultColumnWidth, getFontReplacer, getRowName, isOutputColumnHeaders, isOutputHiddenColumns, isOutputHiddenRows, isOutputLeadingSpacesAsNonBreaking, isOutputRowNumbers, isTextEmpty, setFontReplacer, setOutputColumnHeaders, setOutputHiddenColumns, setOutputHiddenRows, setOutputLeadingSpacesAsNonBreaking, setOutputRowNumbers
public ExcelToFoConverter(org.w3c.dom.Document document)
public ExcelToFoConverter(FoDocumentFacade foDocumentFacade)
public static void main(java.lang.String[] args) throws java.lang.Exception
ExcelToFoConverter
Usage: ExcelToHtmlConverter infile outfile
Where infile is an input .xls file ( Word 97-2007) which will be rendered as XSL FO into outfilejava.lang.Exception
public static org.w3c.dom.Document process(java.io.File xlsFile) throws java.lang.Exception
xlsFile
- file to processjava.lang.Exception
protected java.lang.String createPageMaster(float tableWidthIn, java.lang.String pageMasterName)
protected org.w3c.dom.Document getDocument()
getDocument
in class AbstractExcelConverter
public float getPageMarginInches()
protected boolean isEmptyStyle(CellStyle cellStyle)
protected boolean processCell(HSSFWorkbook workbook, HSSFCell cell, org.w3c.dom.Element tableCellElement, int normalWidthPx, int maxSpannedWidthPx, float normalHeightPt)
protected void processCellStyle(HSSFWorkbook workbook, HSSFCellStyle cellStyle, org.w3c.dom.Element cellTarget, org.w3c.dom.Element blockTarget)
protected void processCellStyleBorder(HSSFWorkbook workbook, org.w3c.dom.Element cellTarget, java.lang.String type, BorderStyle xlsBorder, short borderColor)
protected void processCellStyleFont(HSSFWorkbook workbook, org.w3c.dom.Element blockTarget, HSSFFont font)
protected void processColumnHeaders(HSSFSheet sheet, int maxSheetColumns, org.w3c.dom.Element table)
protected float processColumnWidths(HSSFSheet sheet, int maxSheetColumns, org.w3c.dom.Element table)
AbstractExcelConverter.isOutputRowNumbers()
==true)protected void processDocumentInformation(SummaryInformation summaryInformation)
protected int processRow(HSSFWorkbook workbook, CellRangeAddress[][] mergedRanges, HSSFRow row, org.w3c.dom.Element tableRowElement)
protected org.w3c.dom.Element processRowNumber(HSSFRow row)
protected float processSheet(HSSFWorkbook workbook, HSSFSheet sheet, org.w3c.dom.Element flow)
protected boolean processSheet(HSSFWorkbook workbook, int sheetIndex)
protected void processSheetName(HSSFSheet sheet, org.w3c.dom.Element flow)
public void processWorkbook(HSSFWorkbook workbook)
public void setPageMarginInches(float pageMarginInches)
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.