Package com.digitizer.io
Class CsvExporter
java.lang.Object
com.digitizer.io.CsvExporter
Handles CSV export of graph digitizer datasets.
The CSV is written in "wide" format where the first column contains distinct X values (sorted) and each following column contains the corresponding Y value for a given dataset. The exporter collates values from multiple series and leaves empty cells when a dataset lacks a value for a particular X.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidexportToCsv(String filePath, List<Dataset> datasets) Exports datasets to a CSV file in wide format.
-
Method Details
-
exportToCsv
Exports datasets to a CSV file in wide format. The first column contains x values, followed by one column per dataset containing y values. Missing values are left blank.- Parameters:
filePath- the path where the CSV file will be writtendatasets- the datasets to export- Throws:
IOException- if writing to the file fails
-