Skip to main content

encode

Function encode 

Source
pub fn encode(
    records: &[Value],
    sheet: Option<&str>,
) -> Result<Vec<u8>, FaucetError>
Available on crate feature file-format-excel only.
Expand description

Write records as a single-worksheet workbook.

Columns are the first-seen union of every record’s keys, so a record that gains a field mid-page widens the sheet rather than losing the field. Numbers and booleans are written as their Excel types; everything else is text, with nested structure re-serialized as JSON rather than dropped.