Algostream_reporting.ExportTabular export: CSV and JSON from one column description.
The CSV writers that already existed (Backtest.Result.write_blotter_csv) emit strategy_id and tag with a bare %s. Both are strategy-supplied free text — tag exists precisely so a fill can be traced back to the reason it was placed — so a comma or a newline in either silently corrupts the file, shifting every later column by one. This module quotes properly, per RFC 4180: a field containing a comma, a double quote, CR or LF is wrapped in quotes with internal quotes doubled.
Excel export is not implemented. A real .xlsx is a ZIP container of OOXML parts, which is a meaningful amount of machinery for a format Excel opens from CSV anyway. It is listed as a deferral rather than quietly dropped.
Quote one field for CSV. Exposed because Backtest.Result needs the same rule without taking a dependency on this library.
val value_to_csv : value -> stringval to_csv : headers:string list -> rows:value list list -> stringto_csv ~headers ~rows — rows are already-extracted values, one list per row.
val to_json : headers:string list -> rows:value list list -> stringSame data as a JSON array of objects. Keys come from headers; non-finite floats become null, so the output is always parseable.
val format_of_string : string -> (format, string) Stdlib.resultval format_to_string : format -> stringval content_type : format -> string