Interface ExcelTemplateService
- All Known Implementing Classes:
DefaultExcelTemplateService
Deprecated, for removal: This API element is subject to removal in a future version.
Service responsible for operation on excel file.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTypeSheet(String typeName, org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.org.apache.poi.ss.usermodel.RowcreateEmptyRow(org.apache.poi.ss.usermodel.Sheet sheet) Deprecated.since 1808.org.apache.poi.ss.usermodel.SheetcreateTypeSheet(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.org.apache.poi.ss.usermodel.WorkbookDeprecated.since 1808.intfindColumnIndex(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute) Deprecated.since 1808.findSheetNameForTypeCode(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.findTypeCodeForSheetName(String sheetName, org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.getAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, String isoCode) Deprecated.since 1808.getCellValue(org.apache.poi.ss.usermodel.Cell cell) Deprecated.since 1808.getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet) Deprecated.since 1808.getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet) Deprecated.since 1808.List<org.apache.poi.ss.usermodel.Sheet>getSheets(org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.getSheetsNames(org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.org.apache.poi.ss.usermodel.SheetgetTypeSystemSheet(org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808.voidinsertAttributeHeader(org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute, int columnIndex) Deprecated.since 1808.voidinsertAttributesHeader(org.apache.poi.ss.usermodel.Sheet sheet, Collection<SelectedAttribute> selectedAttributes) Deprecated.since 1808.voidinsertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, Object object) Deprecated.since 1808.
-
Method Details
-
createWorkbook
Deprecated.since 1808. UseExcelWorkbookService.createWorkbook(InputStream)insteadCreates workbook object based on inputStream of excel file. If inputStream doesn't contains excel file then new empty Workbook will be returned.- Parameters:
is- Input stream of excel file- Returns:
Workbookobject which represents excel file
-
getTypeSystemSheet
org.apache.poi.ss.usermodel.Sheet getTypeSystemSheet(org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808. UseExcelWorkbookService.getMetaInformationSheet(Workbook)insteadReturns sheet which contains metadata about type system- Parameters:
workbook-Workbookobject which represents excel file- Returns:
Sheetwhich contains information about type system
-
getSheetsNames
Deprecated.since 1808. UseExcelSheetService.getSheetsNames(Workbook)insteadReturns all sheets names except utility sheets.- Parameters:
workbook-Workbookobject which represents excel file- Returns:
- list of sheets names
-
getSheets
Deprecated.since 1808. UseExcelSheetService.getSheets(Workbook)insteadReturns all sheets except utility sheets.- Parameters:
workbook-Workbookobject which represents excel file- Returns:
- list of sheets
-
getCellValue
Deprecated.since 1808. UseExcelCellService.getCellValue(Cell)insteadReturns cell value as a string value. In case when cell contains formula then the formula is evaluated and result of the evaluation is returned.- Parameters:
cell-Cell- Returns:
- string value of cell
-
getHeaders
List<SelectedAttribute> getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet) Deprecated.since 1808. UseExcelHeaderService.getHeaders(Sheet, Sheet)insteadReturns list of selected attributes for given sheet, based on metainformation from type system sheet.- Parameters:
typeSystemSheet-Sheetcontains metainformation about attributes for each type sheetstypeSheet-Sheetcontains data for given sheet- Returns:
- list of selected attributes
-
getSelectedAttributesQualifiers
List<SelectedAttributeQualifier> getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet) Deprecated.since 1808. UseExcelHeaderService.getSelectedAttributesQualifiers(Sheet, Sheet)insteadReturns qualifiers of attributes which at selected in the typSheet- Parameters:
typeSystemSheet-Sheetcontains metainformation about attributes for each type sheetstypeSheet-Sheetcontains data for given sheet- Returns:
- list of selected attributes.
-
findColumnIndex
int findColumnIndex(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute) Deprecated.since 1808. UseExcelSheetService.findColumnIndex(Sheet, Sheet, ExcelAttribute)insteadFinds column index based on selected attribute. If column doesn't exist then -1 will be returned.- Parameters:
typeSystemSheet- - sheet which contains information about type systemsheet- sheet for current typeselectedAttribute- attribute for which column index should be found.- Returns:
- column index for given selected attribute. If column doesn't exist then -1 will be returned.
-
createTypeSheet
org.apache.poi.ss.usermodel.Sheet createTypeSheet(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook) Deprecated.since 1808. UseExcelSheetService.createTypeSheet(Workbook, String)insteadCreates a new type sheet in given workbook. If a sheet with given typeCode already exists, it is returned without creating an extra one.- Parameters:
typeCode- a new sheet nameworkbook- workbook which will be extended by a new sheet- Returns:
- sheet
-
findTypeCodeForSheetName
Deprecated.since 1808. UseExcelSheetService.findTypeCodeForSheetName(Workbook, String)insteadFinds type code for given sheet name.- Parameters:
sheetName- sheet name.workbook- workbook.- Returns:
- found type code.
-
findSheetNameForTypeCode
Deprecated.since 1808. UseExcelSheetService.findSheetNameForTypeCode(Workbook, String)insteadFinds sheet name for given type code.- Parameters:
typeCode- type codeworkbook- workbook- Returns:
- found type code.
-
addTypeSheet
Deprecated.since 1808. UseExcelSheetService.createTypeSheet(Workbook, String)insteadAdds a new sheet to given workbook.- Parameters:
typeName- a new sheet name.workbook- workbook which will be extended by a new sheet
-
insertAttributeHeader
void insertAttributeHeader(org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute, int columnIndex) Deprecated.since 1808. UseExcelHeaderService.insertAttributeHeader(Sheet, ExcelAttribute, int)insteadInserts value to the sheet's header (first row)- Parameters:
sheet- where the value will be insertedselectedAttribute- a pojo which allows to retrieve value to insertcolumnIndex- index of a column for inserted value
-
insertAttributesHeader
void insertAttributesHeader(org.apache.poi.ss.usermodel.Sheet sheet, Collection<SelectedAttribute> selectedAttributes) Deprecated.since 1808. UseExcelHeaderService.insertAttributesHeader(Sheet, Collection)insteadA shortcut forinsertAttributeHeader(Sheet, SelectedAttribute, int)It is possible to inserts all values to the header at once instead of invokinginsertAttributeHeader(Sheet, SelectedAttribute, int)for every attribute separately- Parameters:
sheet- where the value will be insertedselectedAttributes- a pojo which allows to retrieve value to insert
-
insertAttributeValue
Deprecated.since 1808. UseExcelCellService.insertAttributeValue(Cell, Object)insteadInserts given value to a given cell- Parameters:
cell- where the value will be insertedobject- a value to insert
-
createEmptyRow
org.apache.poi.ss.usermodel.Row createEmptyRow(org.apache.poi.ss.usermodel.Sheet sheet) Deprecated.since 1808. UseExcelSheetService.createEmptyRow(Sheet)insteadCreates an empty row in given sheet.- Parameters:
sheet- where the row will be created- Returns:
- row
-
getAttributeDisplayName
Deprecated.since 1808. UseDisplayNameAttributeNameFormatter.format(ExcelAttributeContext)insteadReturns displayed header name based on attribute descriptor- Parameters:
attributeDescriptorModel- attribute descriptor of selected attributeisoCode- - isoCode of language- Returns:
- displayed header name based on attribute descriptor
-
ExcelCellServiceExcelHeaderServiceExcelSheetServiceExcelWorkbookServiceAttributeNameFormatter