Class DataViewPOIHelper

java.lang.Object
org.imixs.workflow.dataview.DataViewPOIHelper

public class DataViewPOIHelper extends Object
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
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    downloadExcelFile(org.imixs.workflow.FileData fileData)
    Helper method to initialize a file download
    static void
    evalXSSFSheet(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 XSWorkbook
    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 postion
    static void
    poiUpdate(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 invoice
    static void
    replaceXSSFSheetItemValue(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 value
    static void
    updateXSSFWorkbook(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DataViewPOIHelper

      public DataViewPOIHelper()
  • Method Details

    • downloadExcelFile

      public static void downloadExcelFile(org.imixs.workflow.FileData fileData) throws IOException
      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 postion

      Examples 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