public class DefaultExcelSheetService extends java.lang.Object implements ExcelSheetService
ExcelSheetService| Constructor and Description |
|---|
DefaultExcelSheetService() |
| Modifier and Type | Method and Description |
|---|---|
Sheet |
createOrGetTypeSheet(Workbook workbook,
java.lang.String typeCode)
Creates a new type sheet in given workbook.
|
Sheet |
createOrGetUtilitySheet(Workbook workbook,
java.lang.String sheetName)
Creates a new utility sheet in given workbook.
|
Sheet |
createTypeSheet(Workbook workbook,
java.lang.String sheetName)
Creates a new sheet and adds it to given workbook.
|
protected java.lang.String |
findAttributeDisplayNameInTypeSystemSheet(Sheet typeSystemSheet,
ExcelAttribute excelAttribute) |
int |
findColumnIndex(Sheet typeSystemSheet,
Sheet sheet,
ExcelAttribute excelAttribute)
Finds column index based on selected attribute.
|
java.lang.String |
findSheetNameForTypeCode(Workbook workbook,
java.lang.String typeCode)
Finds sheet name for given type code.
|
java.lang.String |
findTypeCodeForSheetName(Workbook workbook,
java.lang.String sheetName)
Finds type code for given sheet name.
|
java.util.Collection<Sheet> |
getSheets(Workbook workbook)
Returns all sheets except utility sheets.
|
java.util.Collection<java.lang.String> |
getSheetsNames(Workbook workbook)
Returns all sheets names except utility sheets.
|
void |
setAttributeNameFormatter(AttributeNameFormatter<ExcelAttributeDescriptorAttribute> attributeNameFormatter) |
void |
setCollectionFormatter(CollectionFormatter collectionFormatter) |
void |
setExcelCellService(ExcelCellService excelCellService) |
void |
setExcelSheetNamingStrategy(ExcelSheetNamingStrategy excelSheetNamingStrategy) |
void |
setExcelWorkbookService(ExcelWorkbookService excelWorkbookService) |
void |
setExcludedSheets(java.util.Collection<ExcelTemplateConstants.UtilitySheet> excludedSheets) |
void |
setHeaderRowIndex(ExcelTemplateConstants.Header headerRowIndex) |
void |
setTypeTemplate(ExcelTemplateConstants.UtilitySheet typeTemplate) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateEmptyRow, getSheetpublic java.util.Collection<java.lang.String> getSheetsNames(Workbook workbook)
ExcelSheetServicegetSheetsNames in interface ExcelSheetServiceworkbook - Workbook object which represents excel filepublic java.util.Collection<Sheet> getSheets(Workbook workbook)
ExcelSheetServicegetSheets in interface ExcelSheetServiceworkbook - Workbook object which represents excel filepublic Sheet createOrGetTypeSheet(Workbook workbook,
java.lang.String typeCode)
ExcelSheetServicecreateOrGetTypeSheet in interface ExcelSheetServiceworkbook - workbook which will be extended by a new sheettypeCode - a new sheet namepublic Sheet createTypeSheet(Workbook workbook,
java.lang.String sheetName)
ExcelSheetServicecreateTypeSheet in interface ExcelSheetServiceworkbook - workbook which will be extended by a new sheetsheetName - a new sheet namepublic Sheet createOrGetUtilitySheet(Workbook workbook,
java.lang.String sheetName)
ExcelSheetServicecreateOrGetUtilitySheet in interface ExcelSheetServiceworkbook - workbook which will be extended by a new sheetsheetName - a new sheet name.public int findColumnIndex(Sheet typeSystemSheet,
Sheet sheet,
ExcelAttribute excelAttribute)
ExcelSheetServicefindColumnIndex in interface ExcelSheetServicetypeSystemSheet - sheet which contains information about type systemsheet - sheet for current typeexcelAttribute - attribute for which column index should be foundpublic java.lang.String findTypeCodeForSheetName(Workbook workbook,
java.lang.String sheetName)
ExcelSheetServicefindTypeCodeForSheetName in interface ExcelSheetServiceworkbook - workbooksheetName - sheet namepublic java.lang.String findSheetNameForTypeCode(Workbook workbook,
java.lang.String typeCode)
ExcelSheetServicefindSheetNameForTypeCode in interface ExcelSheetServiceworkbook - workbooktypeCode - type codeprotected java.lang.String findAttributeDisplayNameInTypeSystemSheet(Sheet typeSystemSheet,
ExcelAttribute excelAttribute)
public void setCollectionFormatter(CollectionFormatter collectionFormatter)
public void setExcelCellService(ExcelCellService excelCellService)
public void setExcelSheetNamingStrategy(ExcelSheetNamingStrategy excelSheetNamingStrategy)
public void setAttributeNameFormatter(AttributeNameFormatter<ExcelAttributeDescriptorAttribute> attributeNameFormatter)
public void setExcelWorkbookService(ExcelWorkbookService excelWorkbookService)
public void setExcludedSheets(java.util.Collection<ExcelTemplateConstants.UtilitySheet> excludedSheets)
public void setTypeTemplate(ExcelTemplateConstants.UtilitySheet typeTemplate)
public void setHeaderRowIndex(ExcelTemplateConstants.Header headerRowIndex)
Copyright © 2018 SAP SE. All Rights Reserved.