Package io.keikai.range.impl.imexp
Class ExcelXlsImporter
- java.lang.Object
-
- io.keikai.range.impl.imexp.AbstractImporter
-
- io.keikai.range.impl.imexp.AbstractExcelImporter
-
- io.keikai.range.impl.imexp.ExcelXlsImporter
-
- All Implemented Interfaces:
SImporter
,Serializable
public class ExcelXlsImporter extends AbstractExcelImporter
- Since:
- 3.5.0
- Author:
- Hawk
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class io.keikai.range.impl.imexp.AbstractExcelImporter
_importCache, book, importedPictureData, styleCache, workbook
-
Fields inherited from class io.keikai.range.impl.imexp.AbstractImporter
BOOK_TYPE_KEY
-
-
Constructor Summary
Constructors Constructor Description ExcelXlsImporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SChart.ChartType
convertChartType(HSSFChart hssfChart)
refer to 2.2.3.7 Chart Groupprotected Workbook
createPoiBook(InputStream is)
protected int
getAnchorHeightInPx(ClientAnchor anchor, Sheet poiSheet)
reference DefaultBookWidgetLoader.getHSSFHeightInPx()protected int
getAnchorWidthInPx(ClientAnchor anchor, Sheet sheet)
reference DefaultBookWidgetLoader.getHSSFWidthInPx()protected String
getCategoryFormula(LinkedDataRecord dataCategoryLabels)
cannot import string literal value.protected String
getChartTitle(HSSFChart hssfChart)
protected int
getLastChangedColumnIndex(Sheet poiSheet)
protected String
getTitleFormula(HSSFChart.HSSFSeries series, int index)
protected String
getValueFormula(LinkedDataRecord dataValues)
cannot import string literal value.protected int
getXoffsetInPixel(ClientAnchor anchor, Sheet poiSheet)
protected int
getYoffsetInPixel(ClientAnchor anchor, Sheet poiSheet)
protected void
importAxis(HSSFChart hssfChart, SChart chart)
protected void
importChart(List<HSSFChartShape> poiCharts, Sheet poiSheet, SSheet sheet)
protected SColorFilter
importColorFilter(ColorFilter colorFilter)
protected void
importColumn(Sheet poiSheet, SSheet sheet)
When a column is hidden with default width, we don't import the width for it's 0.protected void
importConditionalFormatting(SSheet sheet, Sheet poiSheet)
protected SCustomFilters
importCustomFilters(CustomFilters customFilters)
protected void
importDrawings(Sheet poiSheet, SSheet sheet)
reference DrawingManagerImpl.initHSSFDrawings()protected SDynamicFilter
importDynamicFilter(DynamicFilter dynamicFilter)
protected void
importExternalBookLinks()
Excel uses external book links to map external book index and name.protected void
importPassword(Sheet poiSheet, SSheet sheet)
protected void
importSeries(List<HSSFChart.HSSFSeries> seriesList, SGeneralChartData chartData)
reference ChartHelper.prepareCategoryModel()protected void
importSheetProtection(Sheet poiSheet, SSheet sheet)
POI SheetProtection.protected void
importTables(Sheet poiSheet, SSheet sheet)
POI sheet tablesprotected STop10Filter
importTop10Filter(Top10Filter top10Filter)
protected void
importValidation(Sheet poiSheet, SSheet sheet)
protected void
importXySeries(List<HSSFChart.HSSFSeries> seriesList, SGeneralChartData chartData)
reference ChartHelper.prepareXYModel()protected void
importXyzSeries(List<HSSFChart.HSSFSeries> seriesList, SGeneralChartData chartData)
protected void
setBookType(SBook book)
protected boolean
skipName(Name definedName)
-
Methods inherited from class io.keikai.range.impl.imexp.AbstractExcelImporter
createZssFont, getBookType, getPoiFontFromRichText, importAutoFilter, importAutoFilterColumns, importCell, importCellStyle, importCellStyle, importDefaultCellStyles, importExtraStyles, importFont, importMergedRegions, importNamedRange, importNamedStyles, importPicture, importRichText, importRow, imports, importSheet, importSheetDefaultColumnWidth, importTableStyles, isImportCache, mustCalc, setImportCache, toViewAnchor, toZssFont
-
Methods inherited from class io.keikai.range.impl.imexp.AbstractImporter
imports, imports
-
-
-
-
Method Detail
-
createPoiBook
protected Workbook createPoiBook(InputStream is) throws IOException
- Specified by:
createPoiBook
in classAbstractExcelImporter
- Throws:
IOException
-
importExternalBookLinks
protected void importExternalBookLinks()
Description copied from class:AbstractExcelImporter
Excel uses external book links to map external book index and name. The formula contains full external book name or index only (e.g [book2.xlsx] or [1]). We needs such table for parsing and evaluating formula when necessary.- Specified by:
importExternalBookLinks
in classAbstractExcelImporter
-
getLastChangedColumnIndex
protected int getLastChangedColumnIndex(Sheet poiSheet)
- Parameters:
poiSheet
-- Returns:
- 256
-
importColumn
protected void importColumn(Sheet poiSheet, SSheet sheet)
When a column is hidden with default width, we don't import the width for it's 0. We also don't import the width that equals to default width for optimization.- Specified by:
importColumn
in classAbstractExcelImporter
-
importChart
protected void importChart(List<HSSFChartShape> poiCharts, Sheet poiSheet, SSheet sheet)
-
convertChartType
protected SChart.ChartType convertChartType(HSSFChart hssfChart)
refer to 2.2.3.7 Chart Group- Parameters:
hssfChart
-- Returns:
-
importDrawings
protected void importDrawings(Sheet poiSheet, SSheet sheet)
reference DrawingManagerImpl.initHSSFDrawings()- Specified by:
importDrawings
in classAbstractExcelImporter
- Parameters:
poiSheet
-
-
getAnchorHeightInPx
protected int getAnchorHeightInPx(ClientAnchor anchor, Sheet poiSheet)
reference DefaultBookWidgetLoader.getHSSFHeightInPx()- Specified by:
getAnchorHeightInPx
in classAbstractExcelImporter
- Parameters:
anchor
-poiSheet
-- Returns:
-
getAnchorWidthInPx
protected int getAnchorWidthInPx(ClientAnchor anchor, Sheet sheet)
reference DefaultBookWidgetLoader.getHSSFWidthInPx()- Specified by:
getAnchorWidthInPx
in classAbstractExcelImporter
- Parameters:
anchor
-sheet
-- Returns:
-
importSeries
protected void importSeries(List<HSSFChart.HSSFSeries> seriesList, SGeneralChartData chartData)
reference ChartHelper.prepareCategoryModel()- Parameters:
seriesList
-chartData
-
-
importXySeries
protected void importXySeries(List<HSSFChart.HSSFSeries> seriesList, SGeneralChartData chartData)
reference ChartHelper.prepareXYModel()- Parameters:
seriesList
-chartData
-
-
importXyzSeries
protected void importXyzSeries(List<HSSFChart.HSSFSeries> seriesList, SGeneralChartData chartData)
-
getValueFormula
protected String getValueFormula(LinkedDataRecord dataValues)
cannot import string literal value.- Parameters:
dataValues
-- Returns:
-
getCategoryFormula
protected String getCategoryFormula(LinkedDataRecord dataCategoryLabels)
cannot import string literal value.- Parameters:
dataCategoryLabels
-- Returns:
-
getTitleFormula
protected String getTitleFormula(HSSFChart.HSSFSeries series, int index)
-
getXoffsetInPixel
protected int getXoffsetInPixel(ClientAnchor anchor, Sheet poiSheet)
- Specified by:
getXoffsetInPixel
in classAbstractExcelImporter
-
getYoffsetInPixel
protected int getYoffsetInPixel(ClientAnchor anchor, Sheet poiSheet)
- Specified by:
getYoffsetInPixel
in classAbstractExcelImporter
-
importValidation
protected void importValidation(Sheet poiSheet, SSheet sheet)
- Specified by:
importValidation
in classAbstractExcelImporter
-
skipName
protected boolean skipName(Name definedName)
- Overrides:
skipName
in classAbstractExcelImporter
-
setBookType
protected void setBookType(SBook book)
- Specified by:
setBookType
in classAbstractExcelImporter
-
importPassword
protected void importPassword(Sheet poiSheet, SSheet sheet)
- Specified by:
importPassword
in classAbstractExcelImporter
-
importSheetProtection
protected void importSheetProtection(Sheet poiSheet, SSheet sheet)
Description copied from class:AbstractExcelImporter
POI SheetProtection.- Specified by:
importSheetProtection
in classAbstractExcelImporter
- Parameters:
poiSheet
- source POI sheetsheet
- destination sheet
-
importTables
protected void importTables(Sheet poiSheet, SSheet sheet)
Description copied from class:AbstractExcelImporter
POI sheet tables- Specified by:
importTables
in classAbstractExcelImporter
- Parameters:
poiSheet
- source POI sheetsheet
- destination sheet
-
importConditionalFormatting
protected void importConditionalFormatting(SSheet sheet, Sheet poiSheet)
- Specified by:
importConditionalFormatting
in classAbstractExcelImporter
-
importColorFilter
protected SColorFilter importColorFilter(ColorFilter colorFilter)
-
importCustomFilters
protected SCustomFilters importCustomFilters(CustomFilters customFilters)
-
importDynamicFilter
protected SDynamicFilter importDynamicFilter(DynamicFilter dynamicFilter)
-
importTop10Filter
protected STop10Filter importTop10Filter(Top10Filter top10Filter)
-
-