Skip to main content

Module export

Module export 

Source
Expand description

Exports reports, tasks and summaries to CSV, JSON and Excel, including the hourly (SiServer-style) Excel layout.

use kasl::libs::export::{Exporter, ExportFormat, ExportData};
use chrono::NaiveDate;

let exporter = Exporter::new(ExportFormat::Csv, None);
exporter.export(ExportData::Report, NaiveDate::from_ymd_opt(2025, 1, 15).unwrap()).await?;

Structs§

ExportDaySum
One day’s line in the exported monthly summary.
ExportInterval
One work interval row in the exported report.
ExportReport
A daily report as exported; fields are pre-formatted strings.
ExportSummary
A monthly summary as exported.
ExportTask
One task row in the exported report.
Exporter
Gathers data and writes it in the chosen format.

Enums§

ExportData
What gets exported.
ExportFormat
Output formats for exports.