Class XlsExporter

java.lang.Object
com.e1c.langtool.internal.stat.export.XlsExporter
All Implemented Interfaces:
IStatisticsExporter

public class XlsExporter extends Object implements IStatisticsExporter
Implements the IStatisticsExporter interface to export statistical data to an XLS (Excel) file. This class is responsible for organizing and writing statistics provided by a StatisticsProvider into an Excel spreadsheet, where each translation language and metric is represented in a structured format. The output file is suitable for analysis and reporting purposes. The process of exporting includes handling and logging errors encountered during the file writing.
  • Constructor Details

    • XlsExporter

      public XlsExporter()
  • Method Details

    • export

      public void export(Path path, StatisticsProvider provider, Collection<TranslateLanguage> languages, Collection<Metric> metrics) throws IOException
      Exports statistical data to an XLS file at the specified path. This involves organizing the data according to the provided languages and metrics, ensuring a readable and analyzable format in the resulting Excel file.
      Specified by:
      export in interface IStatisticsExporter
      Parameters:
      path - The Path where the exported data should be saved. This path must be accessible and writable by the implementation. Must not be null.
      provider - The StatisticsProvider that supplies the statistical data to be exported. Must not be null.
      languages - A Collection of TranslateLanguage objects specifying the languages for which statistics should be exported. If empty, the implementation may decide to export statistics for all available languages. Must not be null.
      metrics - A Collection of Metric objects defining the specific statistical measurements to be included in the export. If empty, the implementation may decide to include all available metrics. Must not be null.
      Throws:
      IOException - if an I/O error occurs during the export process. Implementations should ensure to handle such exceptions appropriately.