Class QueryHistoricTimeseriesExportXlsxResponse.XlsxUtils

java.lang.Object
io.openems.common.jsonrpc.response.QueryHistoricTimeseriesExportXlsxResponse.XlsxUtils
Enclosing class:
QueryHistoricTimeseriesExportXlsxResponse

protected static class QueryHistoricTimeseriesExportXlsxResponse.XlsxUtils extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    addBasicInfo(org.dhatim.fastexcel.Worksheet ws, String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, ResourceBundle translationBundle)
    Adds basic information like the Edge-ID, date of creation,...
    protected static void
    addEnergyData(org.dhatim.fastexcel.Worksheet ws, SortedMap<ChannelAddress,com.google.gson.JsonElement> data, ResourceBundle translationBundle)
    Adds the energy data header and values.
    protected static void
    addFloatValue(org.dhatim.fastexcel.Worksheet ws, int row, int col, float value)
    Helper method to add the value to the excel sheet.
    protected static void
    addKwhValueIfnotNull(org.dhatim.fastexcel.Worksheet ws, int row, int col, com.google.gson.JsonElement jsonElement, ResourceBundle translationBundle)
    Helper method to add a energy value in unit [Wh] to the excel sheet.
    protected static void
    addPowerData(org.dhatim.fastexcel.Worksheet ws, SortedMap<ZonedDateTime,SortedMap<ChannelAddress,com.google.gson.JsonElement>> data, ResourceBundle translationBundle)
    Adds the power data header and values.
    protected static void
    addStringValue(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
    Helper method to add the value to the excel sheet.
    protected static void
    addStringValueBold(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
    Helper method to add a value in bold font style to the excel sheet.
    protected static void
    addStringValueItalic(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
    Helper method to add a value in bold + italic font style to the excel sheet.
    protected static void
    addStringValueRightAligned(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
    Helper method to add the value to the excel sheet.

    Methods inherited from class java.lang.Object

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

    • XlsxUtils

      protected XlsxUtils()
  • Method Details

    • addBasicInfo

      protected static void addBasicInfo(org.dhatim.fastexcel.Worksheet ws, String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, ResourceBundle translationBundle)
      Adds basic information like the Edge-ID, date of creation,...
      Parameters:
      ws - the Worksheet
      edgeId - the edgeId number
      fromDate - the fromdate the excel exported from
      toDate - the todate the excel exported to
      translationBundle - the ResourceBundle for translations
    • addEnergyData

      protected static void addEnergyData(org.dhatim.fastexcel.Worksheet ws, SortedMap<ChannelAddress,com.google.gson.JsonElement> data, ResourceBundle translationBundle) throws OpenemsError.OpenemsNamedException
      Adds the energy data header and values.
      Parameters:
      ws - the Worksheet
      data - the energy data map
      translationBundle - the ResourceBundle for translations
      Throws:
      OpenemsError.OpenemsNamedException - on error
    • addPowerData

      protected static void addPowerData(org.dhatim.fastexcel.Worksheet ws, SortedMap<ZonedDateTime,SortedMap<ChannelAddress,com.google.gson.JsonElement>> data, ResourceBundle translationBundle) throws OpenemsError.OpenemsNamedException
      Adds the power data header and values.
      Parameters:
      ws - the Worksheet
      data - the power data map
      translationBundle - the ResourceBundle for translations
      Throws:
      OpenemsError.OpenemsNamedException - on error
    • addStringValueBold

      protected static void addStringValueBold(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
      Helper method to add a value in bold font style to the excel sheet.
      Parameters:
      ws - the Worksheet
      row - row number
      col - column number
      value - actual value to be bold
    • addStringValueItalic

      protected static void addStringValueItalic(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
      Helper method to add a value in bold + italic font style to the excel sheet.
      Parameters:
      ws - the Worksheet
      row - row number
      col - column number
      value - actual value to be bold
    • addKwhValueIfnotNull

      protected static void addKwhValueIfnotNull(org.dhatim.fastexcel.Worksheet ws, int row, int col, com.google.gson.JsonElement jsonElement, ResourceBundle translationBundle) throws OpenemsError.OpenemsNamedException
      Helper method to add a energy value in unit [Wh] to the excel sheet. The value is rounded to 100 Wh and formatted as [kWh]. If the value is 'null', is added instead.
      Parameters:
      ws - the Worksheet
      row - row number
      col - column number
      jsonElement - the value
      translationBundle - the ResourceBundle
      Throws:
      OpenemsError.OpenemsNamedException - on error
    • addStringValueRightAligned

      protected static void addStringValueRightAligned(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
      Helper method to add the value to the excel sheet.
      Parameters:
      ws - the Worksheet
      row - row number
      col - column number
      value - actual value in the sheet
    • addStringValue

      protected static void addStringValue(org.dhatim.fastexcel.Worksheet ws, int row, int col, String value)
      Helper method to add the value to the excel sheet.
      Parameters:
      ws - the Worksheet
      row - row number
      col - column number
      value - actual value in the sheet
    • addFloatValue

      protected static void addFloatValue(org.dhatim.fastexcel.Worksheet ws, int row, int col, float value)
      Helper method to add the value to the excel sheet. The float value is mathematically rounded.
      Parameters:
      ws - the Worksheet
      row - row number
      col - column number
      value - actual value in the sheet