public class XlsxImporter extends AbstractImporter implements Serializable
Modifier and Type | Field and Description |
---|---|
protected SBook |
book
target book model
|
static String |
BUILTIN_PRINT_AREA
A built-in defined name that specifies the workbook's print area
|
static String |
BUILTIN_PRINT_TITLE
A built-in defined name that specifies the row(s) or column(s) to repeat
at the top of each printed page.
|
static int |
ERROR_DIV_0
#DIV/0! - Division by zero
|
static int |
ERROR_FORMULA |
static int |
ERROR_NA
#N/A - Argument or function not available
|
static int |
ERROR_NAME
#NAME? - Wrong function or range name
|
static int |
ERROR_NULL
#NULL! - Intersection of two cell ranges is empty
|
static int |
ERROR_NUM
#NUM! - Value range overflow
|
static int |
ERROR_REF
#REF! - Illegal or deleted cell reference
|
static int |
ERROR_VALUE
#VALUE! - Wrong type of operand
|
protected Map<io.keikai.importer.PictureJson,Integer> |
importedPictureJson
SFont object> |
protected Map<XlsxExtractor.XlsxXfExtractor,SCellStyle> |
importedXfs |
_importCache, BOOK_TYPE_KEY
Constructor and Description |
---|
XlsxImporter() |
imports, imports, isImportCache, setImportCache
protected Map<XlsxExtractor.XlsxXfExtractor,SCellStyle> importedXfs
protected Map<io.keikai.importer.PictureJson,Integer> importedPictureJson
SFont
object>protected SBook book
public static final String BUILTIN_PRINT_AREA
public static final String BUILTIN_PRINT_TITLE
public static final int ERROR_NULL
public static final int ERROR_DIV_0
public static final int ERROR_VALUE
public static final int ERROR_REF
public static final int ERROR_NAME
public static final int ERROR_NUM
public static final int ERROR_NA
public static final int ERROR_FORMULA
public SBook imports(InputStream inputStream, String bookName) throws IOException
SImporter
imports
in interface SImporter
inputStream
- the input streambookName
- the book name for imported bookIOException
protected void importPrintArea(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected void importHyperlinks(XlsxExtractor.XlsxSheetExtractor xSheet)
protected void importVmlDrawing(XlsxExtractor.XlsxSheetExtractor xSheet)
protected void importComments(XlsxExtractor.XlsxSheetExtractor xSheet)
protected void importStyleSheet(XlsxExtractor.XlsxStyleSheetExtractor extractor)
protected void importColors(XlsxExtractor.XlsxRGBColorsExtractor extractor)
protected void importNumFmts(List<XlsxExtractor.XlsxNumFmtExtractor> extractors)
protected void importFonts(List<XlsxExtractor.XlsxFontExtractor> extractors)
protected void importFills(List<XlsxExtractor.XlsxFillExtractor> extractors)
protected void importBorders(List<XlsxExtractor.XlsxBorderExtractor> extractors)
protected void importAutoFilter(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected void importSheetProtection(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected void importValidation(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected void importMergedRegions(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected void importDrawings(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected XSSFChartX createXSSFChartX(XSSFDrawing patriarch, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGraphicalObjectFrame gfrm, XSSFClientAnchor xanchor)
protected void importPicture(io.keikai.importer.PictureJson pictureJson, XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected ViewAnchor toViewAnchor(io.keikai.importer.ShapeJson shapeJson, SSheet sheet)
protected int getAnchorWidthInPx(io.keikai.importer.ShapeJson shapeJson, SSheet sheet)
protected int getAnchorHeightInPx(io.keikai.importer.ShapeJson shapeJson, SSheet sheet)
protected int getXoffsetInPixel(io.keikai.importer.ShapeJson shapeJson)
protected int getYoffsetInPixel(io.keikai.importer.ShapeJson shapeJson)
protected void importChart(io.keikai.importer.ChartSpaceJson chartSpaceJson, XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
XSSFCategoryAxis
doesn't provide API to get title.
Reference ChartHelper.drawXSSFChart()public SChart.ChartGrouping toChartGrouping(String grouping)
protected void importSeries(List<? extends io.keikai.importer.CategorySeriesJson> seriesList, SGeneralChartData chartData)
seriesList
- source chart datachartData
- destination chart dataprotected void importXySeries(List<? extends io.keikai.importer.XYSeriesJson> seriesList, SGeneralChartData chartData)
protected void importAxis(io.keikai.importer.ChartSpaceJson chartSpaceJson, SChart chart)
protected void importXyzSeries(List<? extends io.keikai.importer.XYZSeriesJson> seriesList, SGeneralChartData chartData)
seriesList
- // * @param chartprotected String getTitleFormula(io.keikai.importer.SeriesJson seriesJson, int seriesIndex)
seriesJson
- protected void importColumn(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
public double geDefaultColumnWidthPerBaseColWidth(int baseWidth, int charWidth)
protected SRow importRow(XlsxExtractor.XlsxRowExtractor xRow, SSheet sheet)
protected SCell importCell(XlsxExtractor.XlsxCellExtractor xCell, int row, SSheet sheet)
public static final String getErrorText(int errorCode)
IllegalArgumentException
- if the specified error code is not one of the 7
standard error codespublic static final byte getErrorCode(String errorText)
protected boolean mustCalc(SCell cell)
protected void importRichText(XlsxExtractor.XlsxRichTextExtractor xRichText, SRichText richText)
protected Font getPoiFontFromRichText(Workbook book, Cell cell, RichTextString rstr, int run)
protected SFont createDxfZssFont(XlsxExtractor.XlsxFontExtractor xFont)
protected SFont createZssFont(XlsxExtractor.XlsxFontExtractor xFont)
public static String getBorderHTMLColor(XlsxExtractor.XlsxColorExtractor color, XlsxExtractor.XlsxThemesExtractor themes, XlsxImporter xlsxImporter)
public static String getFontHTMLColor(XlsxExtractor.XlsxColorExtractor color, XlsxExtractor.XlsxThemesExtractor themes, XlsxImporter xlsxImporter)
public static String getForegroundHTMLColor(XlsxExtractor.XlsxColorExtractor color, XlsxExtractor.XlsxThemesExtractor themes, XlsxImporter xlsxImporter)
public static String getBackgroundHTMLColor(XlsxExtractor.XlsxColorExtractor color, XlsxExtractor.XlsxThemesExtractor themes, XlsxImporter xlsxImporter)
public static SFont.Underline toUnderline(String underline)
public static SFont.TypeOffset toTypeOffset(String typeOffset)
protected boolean skipName(XlsxExtractor.XlsxDefinedNameExtractor definedName)
protected void importNamedRange()
protected void importDefaultCellStyles(XlsxExtractor.XlsxStyleSheetExtractor styleSheet)
protected SCellStyle importCellStyleXf(XlsxExtractor.XlsxXfExtractor xCellXf, boolean inStyleTable)
protected void importNamedStyles(XlsxExtractor.XlsxStyleSheetExtractor styleSheet)
protected void importTables(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected void importTableName(STable table)
protected SColorFilter importColorFilter(XlsxExtractor.XlsxColorFilterExtractor colorFilter)
protected void importAutoFilterColumns(XlsxExtractor.XlsxAutoFilterExtractor xFilter, SAutoFilter zssFilter)
protected SCustomFilters importCustomFilters(XlsxExtractor.XlsxCustomFiltersExtractor xCustomFilters)
protected SDynamicFilter importDynamicFilter(XlsxExtractor.XlsxDynamicFilterExtractor xDynamicFilter)
protected STop10Filter importTop10Filter(XlsxExtractor.XlsxTop10Extractor xTop10Filter)
protected void importExtraStyles(XlsxExtractor.XlsxStyleSheetExtractor styleSheet)
protected SExtraStyle importExtraStyle(XlsxExtractor.XlsxDxfExtractor xDxf)
protected SBorder createSBorder(Borders.Border border)
protected void importTableStyles(XlsxExtractor.XlsxStyleSheetExtractor extractor)
protected STableStyleElem importTableStyleElem(XlsxExtractor.XlsxTableStyleElementExtractor styleElement)
protected STableStyle importTableStyle(XlsxExtractor.XlsxTableStyleExtractor tableStyle)
protected void setBookType(SBook book)
protected void importExternalBookLinks(List<XlsxExtractor.XlsxExternalLinkExtractor> externalReferences)
protected void importSheets(List<XlsxExtractor.XlsxSheetExtractor> sheets)
protected SSheet importSheet(XlsxExtractor.XlsxSheetExtractor xSheet)
protected void importPassword(XlsxExtractor.XlsxSheetProtectionExtractor protectionExtractor, SSheet sheet)
protected short getPasswordHash(String password)
protected void importConditionalFormatting(XlsxExtractor.XlsxSheetExtractor xSheet, SSheet sheet)
protected ConditionalFormattingImpl prepareConditionalFormattingImpl(SSheet sheet, XlsxExtractor.XlsxConditionalFormattingExtractor cf)
protected ConditionalFormattingRuleImpl prepareConditonalFormattingRuleImpl(SConditionalFormatting cfi, XlsxExtractor.XlsxCfRuleExtractor xRule)
protected SColorScale prepareColorScale(XlsxExtractor.XlsxCfRuleExtractor ctRule)
protected SIconSet prepareIconSet(XlsxExtractor.XlsxCfRuleExtractor ctRule)
protected void prepareFormulas(ConditionalFormattingRuleImpl cfri, XlsxExtractor.XlsxCfRuleExtractor xRule)
protected SDataBar prepareDataBar(XlsxExtractor.XlsxCfRuleExtractor ctRule)
protected SCFValueObject prepareValueObject(XlsxExtractor.XlsxCfvoExtractor ctvo)
Copyright © 2020. All rights reserved.