Class StatisticsHistoryExcelExport


  • public class StatisticsHistoryExcelExport
    extends Object
    Exports 'History' statistics data into the XLSX format.
    • Constructor Detail

      • StatisticsHistoryExcelExport

        public StatisticsHistoryExcelExport​(DateRange dateRange,
                                            List<ProjektZaehlerDaten> statisticDataList,
                                            ZoneId timeZoneId)
        Creates a new export instance for processing the provided data.
        Parameters:
        dateRange - the date/time interval in which the statistics has been recorded
        statisticDataList - the statistics data itself
        timeZoneId - the active time zone ID, used for date/time conversions
    • Method Detail

      • writeTo

        public void writeTo​(OutputStream os)
        Create the Excel data for the current time interval. The data is filled into a workbook and written to the provided stream. The data is formatted and the cells are aligned. The columns and rows are auto-fitted. The save options guarantee that all columns are on one page.
        Parameters:
        os - the target stream to write the Excel data to