Package org.openl.excel.parser
Interface ExcelReader
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DOMReader,EventReader,SAXReader
public interface ExcelReader extends AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close ExcelReader and release resources.Object[][]getCells(SheetDescriptor sheet)Parse and get all cells from a given sheetList<? extends SheetDescriptor>getSheets()Get all sheet descriptorsTableStylesgetTableStyles(SheetDescriptor sheet, IGridRegion tableRegion)Get styles for a given tablebooleanisUse1904Windowing()Sometimes we need to convert parsed double value to date.
-
-
-
Method Detail
-
getSheets
List<? extends SheetDescriptor> getSheets()
Get all sheet descriptors
-
getCells
Object[][] getCells(SheetDescriptor sheet)
Parse and get all cells from a given sheet- Parameters:
sheet- sheet to parse- Returns:
- parsed objects with types as in Excel
-
isUse1904Windowing
boolean isUse1904Windowing()
Sometimes we need to convert parsed double value to date. For example a cell contains value 1.25, user sees it in Excel as 1.25 but in OpenL this value has a type Date. It should be converted from double to Date. (There is unit test for such case) We should get this property from workbook and use it in DateUtil.getJavaDate(double, boolean) to convert it correctly.- Returns:
- The setting for a given workbook
-
getTableStyles
TableStyles getTableStyles(SheetDescriptor sheet, IGridRegion tableRegion)
Get styles for a given table- Parameters:
sheet- sheet containing the tabletableRegion- region needed to get styles for a given table- Returns:
- Cell styles
-
close
void close()
Close ExcelReader and release resources.- Specified by:
closein interfaceAutoCloseable
-
-