Package org.imixs.workflow.dataview
Class DataViewPOIHelper
java.lang.Object
org.imixs.workflow.dataview.DataViewPOIHelper
The DataViewPOIHelper provides methods to update a excel template with the
help of the Apache POI framework.
- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddownloadExcelFile(org.imixs.workflow.FileData fileData) Helper method to initialize a file downloadstatic voidevalXSSFSheet(org.apache.poi.xssf.usermodel.XSSFWorkbook doc, org.apache.poi.xssf.usermodel.XSSFSheet sheet, String cell) Evaluates a given list of cells in a given XSWorkbookstatic org.apache.poi.xssf.usermodel.XSSFCellgetCellByRef(org.apache.poi.xssf.usermodel.XSSFWorkbook doc, org.apache.poi.xssf.usermodel.XSSFSheet sheet, String cellReference) Returns a Cell by name or an optional absolute cell postionstatic voidpoiUpdate(org.imixs.workflow.ItemCollection dataDefinition, org.imixs.workflow.FileData fileData, org.imixs.workflow.ItemCollection poiConfig, org.imixs.workflow.engine.WorkflowService workflowService) This helper method applies the POI update defintiions a row for each invoicestatic voidreplaceXSSFSheetItemValue(org.apache.poi.xssf.usermodel.XSSFWorkbook doc, org.apache.poi.xssf.usermodel.XSSFSheet sheet, String find, Object itemValue) Helper method replaces a given cell of a XSSFSheet with a typed item valuestatic voidupdateXSSFWorkbook(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, org.imixs.workflow.ItemCollection workitem, List<String> replaceDevList, org.imixs.workflow.engine.WorkflowService workflowService) This method updates the XSSFWorkbook document.
-
Field Details
-
ERROR_CONFIG
- See Also:
-
-
Constructor Details
-
DataViewPOIHelper
public DataViewPOIHelper()
-
-
Method Details
-
downloadExcelFile
Helper method to initialize a file download- Throws:
IOException
-
poiUpdate
public static void poiUpdate(org.imixs.workflow.ItemCollection dataDefinition, org.imixs.workflow.FileData fileData, org.imixs.workflow.ItemCollection poiConfig, org.imixs.workflow.engine.WorkflowService workflowService) throws org.imixs.workflow.exceptions.PluginException This helper method applies the POI update defintiions a row for each invoice- Throws:
org.imixs.workflow.exceptions.PluginException
-
getCellByRef
public static org.apache.poi.xssf.usermodel.XSSFCell getCellByRef(org.apache.poi.xssf.usermodel.XSSFWorkbook doc, org.apache.poi.xssf.usermodel.XSSFSheet sheet, String cellReference) Returns a Cell by name or an optional absolute cell postionExamples for refs are 'A1', 'AB3', 'MyCell' where 'MyCell' is a named cell.
-
updateXSSFWorkbook
public static void updateXSSFWorkbook(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, org.imixs.workflow.ItemCollection workitem, List<String> replaceDevList, org.imixs.workflow.engine.WorkflowService workflowService) throws org.imixs.workflow.exceptions.PluginException This method updates the XSSFWorkbook document. The method can be overwritten by subclasses to add additional logic- Parameters:
workbook-workitem-replaceDevList-- Throws:
org.imixs.workflow.exceptions.PluginException
-
replaceXSSFSheetItemValue
public static void replaceXSSFSheetItemValue(org.apache.poi.xssf.usermodel.XSSFWorkbook doc, org.apache.poi.xssf.usermodel.XSSFSheet sheet, String find, Object itemValue) throws org.imixs.workflow.exceptions.PluginException Helper method replaces a given cell of a XSSFSheet with a typed item value- Throws:
org.imixs.workflow.exceptions.PluginException
-
evalXSSFSheet
public static void evalXSSFSheet(org.apache.poi.xssf.usermodel.XSSFWorkbook doc, org.apache.poi.xssf.usermodel.XSSFSheet sheet, String cell) throws org.imixs.workflow.exceptions.PluginException Evaluates a given list of cells in a given XSWorkbook- Parameters:
doc-sheet-cell-- Throws:
org.imixs.workflow.exceptions.PluginException
-