Annotation Type ExcelFunction


@Documented @Retention(RUNTIME) @Target({}) public @interface ExcelFunction
The Interface ExcelFunction.
ExcelFunction is used to define the excel functions through:
  • Function - to set function
  • NameFunction - function identifier
  • AnotherTable - it is enabled if the function is referred to another table
Here are a series of examples:
  • How to sum the records on a column? - You must concatenate column name with RowStart and RowEnd, example sum(${fieldNameRowStart}:${fieldNameRowEnd}), in the same way on a merged cell you can obtain the sum of a group of rows.
    The names of the two fields must be the same
  • How to sum the records on a row? - Here You will use 2 different fields names and the function will be written as follows: sum(${fieldName1}:${fiedlName2}), indexes should not be written
ExcelFunction is a property of the following annotations: Below an example to calculate functions on rows and columns.
column name 1 column name 2 column name 3 Total
value field1 value field2 value field3 sum(${fieldName1}:$fieldName3)
value field1 value field2 value field3 sum(${fieldName1}:$fieldName3)
value field1 value field2 value field3 sum(${fieldName1}:${fieldName3})
Total column 1 Total column 2 Total column 3 Sum Total
sum(${fieldName1RowStart}:${fieldName1RowEnd}) sum(${fieldName2RowStart}:${fieldName2RowEnd}) sum(${fieldName3RowStart}:${fieldName3RowEnd}) sum(${fieldNameTotalRowStart}:fieldNameTotalRowEnd)
  • Element Details

    • function

      String function
      Function.
      Returns:
      the string
    • nameFunction

      String nameFunction
      Name function.
      Returns:
      the string
    • anotherTable

      boolean anotherTable
      Another table.
      Returns:
      true, if successful
      Default:
      true
    • alias

      Alias.
      Returns:
      the excel formula alias[]
      Default:
      {}
    • onSubTotalRow

      ExcelFunctionSubTotal onSubTotalRow
      Default:
      @bld.generator.report.excel.annotation.ExcelFunctionSubTotal