Interface ExcelTemplateService
-
- All Known Implementing Classes:
DefaultExcelTemplateService
@Deprecated public interface ExcelTemplateServiceDeprecated.since 1808. This service was split for 4 separated services:Service responsible for operation on excel file.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddTypeSheet(java.lang.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(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808.org.apache.poi.ss.usermodel.WorkbookcreateWorkbook(java.io.InputStream is)Deprecated.since 1808.intfindColumnIndex(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute)Deprecated.since 1808.java.lang.StringfindSheetNameForTypeCode(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808.java.lang.StringfindTypeCodeForSheetName(java.lang.String sheetName, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808.java.lang.StringgetAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, java.lang.String isoCode)Deprecated.since 1808.java.lang.StringgetCellValue(org.apache.poi.ss.usermodel.Cell cell)Deprecated.since 1808.java.util.List<SelectedAttribute>getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)Deprecated.since 1808.java.util.List<SelectedAttributeQualifier>getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)Deprecated.since 1808.java.util.List<org.apache.poi.ss.usermodel.Sheet>getSheets(org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808.java.util.List<java.lang.String>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, java.util.Collection<SelectedAttribute> selectedAttributes)Deprecated.since 1808.voidinsertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object object)Deprecated.since 1808.
-
-
-
Method Detail
-
createWorkbook
org.apache.poi.ss.usermodel.Workbook createWorkbook(java.io.InputStream is)
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
java.util.List<java.lang.String> getSheetsNames(org.apache.poi.ss.usermodel.Workbook workbook)
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
java.util.List<org.apache.poi.ss.usermodel.Sheet> getSheets(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.since 1808. UseExcelSheetService.getSheets(Workbook)insteadReturns all sheets except utility sheets.- Parameters:
workbook-Workbookobject which represents excel file- Returns:
- list of sheets
-
getCellValue
java.lang.String getCellValue(org.apache.poi.ss.usermodel.Cell cell)
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
java.util.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
java.util.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(java.lang.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
java.lang.String findTypeCodeForSheetName(java.lang.String sheetName, org.apache.poi.ss.usermodel.Workbook workbook)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
java.lang.String findSheetNameForTypeCode(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808. UseExcelSheetService.findSheetNameForTypeCode(Workbook, String)insteadFinds sheet name for given type code.- Parameters:
typeCode- type codeworkbook- workbook- Returns:
- found type code.
-
addTypeSheet
void addTypeSheet(java.lang.String typeName, org.apache.poi.ss.usermodel.Workbook workbook)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, java.util.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
void insertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object object)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
java.lang.String getAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, java.lang.String isoCode)
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
-
-