mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-31 22:26:57 -06:00
docs/file-format-parity.md: header Change line names both pivot fixes; both change log rows kept
This commit is contained in:
@@ -139,8 +139,9 @@ fn save_as(s: &mut Session, p: &Json) -> Result<Json> {
|
||||
fn save_bytes(s: &mut Session, p: &Json) -> Result<Json> {
|
||||
let fmt = str_param(p, "format").unwrap_or("xlsx");
|
||||
let d = s.doc()?;
|
||||
let bytes = crate::io::save_bytes(&d.wb, &format!("x.{fmt}"))?;
|
||||
let name = format!("{}.{fmt}", std::path::Path::new(&d.display_title()).file_stem().and_then(|x| x.to_str()).unwrap_or("Book"));
|
||||
// The file name goes into a PivotChart's link to its PivotTable.
|
||||
let bytes = crate::io::save_bytes(&d.wb, &name)?;
|
||||
Ok(json!({"name": name, "base64": crate::io::base64_encode(&bytes), "bytes": bytes.len()}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user