diff --git a/Cargo.lock b/Cargo.lock index c9adffd0b..7a72faf1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -937,6 +937,16 @@ name = "craft-fonts-build" version = "0.1.0" source = "git+https://github.com/storytold/craft-libs?rev=aa84415bae3b765fef6b7ef42404f66ad1cff9d9#aa84415bae3b765fef6b7ef42404f66ad1cff9d9" +[[package]] +name = "craft-gridcraft-format" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=9a6d894200221fcfedc274870c30394d404f859d#9a6d894200221fcfedc274870c30394d404f859d" +dependencies = [ + "serde", + "serde_json", + "thiserror 2.0.21", +] + [[package]] name = "craft-i18n" version = "0.1.0" @@ -2215,6 +2225,7 @@ name = "gridcraft-engine" version = "0.19.1" dependencies = [ "craft-csv", + "craft-gridcraft-format", "gridcraft-calc", "gridcraft-chart", "gridcraft-core", diff --git a/Cargo.toml b/Cargo.toml index 3125cbf6e..bfa755770 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,8 @@ craft-opc = { git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0 # Delimited text (CSV, TSV) and SYLK; `crates/xlsx/src/csv.rs` and `crates/engine/src/io/sylk.rs` # turn them into workbooks. craft-csv = { git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0bc842cbde430955825553ab7b976f4", version = "0.1.0" } +# The native JSON workbook (`.json`, `.scjson`): read, written, and kept newer macros written back. +craft-gridcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "9a6d894200221fcfedc274870c30394d404f859d", version = "0.1.0" } # Excel 97-2003 (.xls, BIFF8) workbooks; `crates/xlsx/src/xls.rs` maps them onto the model. craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0bc842cbde430955825553ab7b976f4", version = "0.1.0" } craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0bc842cbde430955825553ab7b976f4", version = "0.1.0" } diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml index c68fb117a..f06e3b8d6 100644 --- a/crates/engine/Cargo.toml +++ b/crates/engine/Cargo.toml @@ -22,6 +22,7 @@ thiserror = { workspace = true } log = { workspace = true } gridcraft-xlsx = { workspace = true } craft-csv = { workspace = true } +craft-gridcraft-format = { workspace = true } gridcraft-chart = { workspace = true } gridcraft-pdf = { workspace = true } gridcraft-math = { workspace = true } diff --git a/crates/engine/src/io.rs b/crates/engine/src/io.rs index 6dd96b042..184c4fdb0 100644 --- a/crates/engine/src/io.rs +++ b/crates/engine/src/io.rs @@ -42,7 +42,7 @@ impl FileKind { "ods" => FileKind::Ods, "csv" => FileKind::Csv, "tsv" | "tab" | "txt" => FileKind::Tsv, - "json" | "scjson" => FileKind::Json, + ext if craft_gridcraft_format::is_extension(ext) => FileKind::Json, "html" | "htm" => FileKind::Html, "slk" => FileKind::Sylk, _ => return None, @@ -316,7 +316,7 @@ fn read_plain(name: &str, bytes: &[u8], csv_as_text: bool) -> Result<(Workbook, } match kind { Some(FileKind::Json) => { - let mut wb: Workbook = serde_json::from_slice(bytes).map_err(|e| EngineError::Other(format!("not a GridCraft JSON workbook: {e}")))?; + let mut wb: Workbook = craft_gridcraft_format::read(bytes).map_err(|e| EngineError::Other(e.to_string()))?; wb.styles.rebuild_index(); if wb.sheets.is_empty() { // The file's macros are read after this (`macros::load`), so they come along. diff --git a/crates/engine/src/macros/mod.rs b/crates/engine/src/macros/mod.rs index ecbe6f674..5df823805 100644 --- a/crates/engine/src/macros/mod.rs +++ b/crates/engine/src/macros/mod.rs @@ -213,17 +213,7 @@ pub fn json_bytes(wb: &Workbook) -> crate::Result> { for m in &wb.macros { check(m).map_err(crate::EngineError::Other)?; } - let bytes = if wb.macros_unread.is_empty() { - serde_json::to_vec_pretty(wb) - } else { - serde_json::to_value(wb).and_then(|mut v| { - if let Some(list) = v.as_object_mut().map(|o| o.entry("macros").or_insert_with(|| Json::Array(vec![]))).and_then(Json::as_array_mut) { - list.extend(wb.macros_unread.iter().cloned()); - } - serde_json::to_vec_pretty(&v) - }) - }; - bytes.map_err(|e| crate::EngineError::Other(e.to_string())) + craft_gridcraft_format::write_with_kept(wb, "macros", &wb.macros_unread).map_err(|e| crate::EngineError::Other(e.to_string())) } /// Whether `v` is a macro in a newer format than this build reads. diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 26bbb3953..4df7fd61e 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -6523,6 +6523,7 @@ fn a_script_cannot_switch_windows() { mod controls; mod equation; +mod json_golden; mod macros; mod objects; mod python_cells; diff --git a/crates/engine/src/tests/json_golden.rs b/crates/engine/src/tests/json_golden.rs new file mode 100644 index 000000000..66680221d --- /dev/null +++ b/crates/engine/src/tests/json_golden.rs @@ -0,0 +1,80 @@ +//! Byte-for-byte checks on the native JSON workbook (`.json`, `.scjson`). The files in +//! `crates/engine/tests/golden` were written before the format moved to `craft-gridcraft-format` +//! (storytold/craft-libs). Saving the same workbook must give the same bytes, and opening a +//! golden file and saving it again must give it back. +//! `GRIDCRAFT_BLESS_GOLDEN=1` rewrites them. Only do that for a deliberate format change. + +use std::path::PathBuf; + +use serde_json::json; + +use super::s; +use crate::Session; + +fn golden(name: &str) -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests").join("golden").join(name) +} + +fn check(name: &str, actual: &[u8]) { + let path = golden(name); + if std::env::var_os("GRIDCRAFT_BLESS_GOLDEN").is_some() { + std::fs::write(&path, actual).unwrap_or_else(|e| panic!("{}: {e}", path.display())); + return; + } + let expected = std::fs::read(&path).unwrap_or_else(|e| panic!("{}: {e}", path.display())); + assert!(expected == actual, "{name} changed ({} bytes, golden has {})", actual.len(), expected.len()); +} + +fn save(s: &mut Session) -> Vec { + let r = s.execute("file.saveBytes", json!({"format": "json"})).unwrap(); + crate::io::base64_decode(r["base64"].as_str().unwrap()).unwrap() +} + +fn open(s: &mut Session, name: &str, bytes: &[u8]) { + s.execute("file.open", json!({"name": name, "base64": crate::io::base64_encode(bytes)})).unwrap(); +} + +/// A workbook with text, numbers, a formula, a style, a number format, a second sheet and a macro. +fn book() -> Session { + let mut s = s(); + for (cell, input) in [("A1", "Item"), ("B1", "Qty"), ("A2", "Äpfel ✓"), ("B2", "3.5"), ("A3", "Pears"), ("B3", "2"), ("B4", "=SUM(B2:B3)")] { + s.execute("cell.set", json!({"cell": cell, "input": input})).unwrap(); + } + s.execute("home.bold", json!({"range": "A1:B1"})).unwrap(); + s.execute("home.numberFormat", json!({"range": "B2:B4", "format": "0.00"})).unwrap(); + s.execute("macro.save", json!({"name": "Fill", "steps": [{"command": "cell.set", "params": {"cell": "C1", "input": "x"}}]})).unwrap(); + s +} + +#[test] +fn a_save_writes_the_golden_workbook_bytes() { + let mut s = book(); + check("book.json", &save(&mut s)); +} + +#[test] +fn the_golden_workbook_opens_and_saves_back_unchanged() { + let bytes = std::fs::read(golden("book.json")).unwrap(); + for name in ["book.json", "book.scjson"] { + let mut s = s(); + open(&mut s, name, &bytes); + assert_eq!(super::v(&s, "B4"), gridcraft_core::Value::Number(5.5), "{name}"); + assert!(save(&mut s) == bytes, "{name} saved back differently"); + } +} + +#[test] +fn macros_in_a_newer_format_are_written_back_as_the_file_held_them() { + // The save that splices kept macros back into `macros` goes through a JSON value. + let mut v: serde_json::Value = serde_json::from_slice(&std::fs::read(golden("book.json")).unwrap()).unwrap(); + v["macros"].as_array_mut().unwrap().push(json!({"name": "Future", "v": gridcraft_model::MACRO_VERSION + 1, "extra": [1, 2]})); + let mut s = s(); + open(&mut s, "kept.json", &serde_json::to_vec_pretty(&v).unwrap()); + check("kept.json", &save(&mut s)); +} + +#[test] +fn what_is_not_a_json_workbook_says_so() { + let err = crate::io::open_bytes("bad.json", b"{\"sheets\": 7}").unwrap_err().to_string(); + check("bad.error.txt", err.as_bytes()); +} diff --git a/crates/engine/tests/golden/.gitattributes b/crates/engine/tests/golden/.gitattributes new file mode 100644 index 000000000..c5d2e24da --- /dev/null +++ b/crates/engine/tests/golden/.gitattributes @@ -0,0 +1,2 @@ +# Golden files are compared byte for byte: no line-ending conversion on checkout. +* -text diff --git a/crates/engine/tests/golden/bad.error.txt b/crates/engine/tests/golden/bad.error.txt new file mode 100644 index 000000000..1b8a6dd14 --- /dev/null +++ b/crates/engine/tests/golden/bad.error.txt @@ -0,0 +1 @@ +not a GridCraft JSON workbook: invalid type: integer `7`, expected a sequence at line 1 column 12 \ No newline at end of file diff --git a/crates/engine/tests/golden/book.json b/crates/engine/tests/golden/book.json new file mode 100644 index 000000000..403189aa7 --- /dev/null +++ b/crates/engine/tests/golden/book.json @@ -0,0 +1,440 @@ +{ + "sheets": [ + { + "name": "Sheet1", + "cells": { + "bands": { + "0": { + "rows": { + "0": { + "0": { + "value": { + "t": "Text", + "v": "Item" + }, + "formula": null, + "style": 1 + }, + "1": { + "value": { + "t": "Text", + "v": "Qty" + }, + "formula": null, + "style": 1 + } + }, + "1": { + "0": { + "value": { + "t": "Text", + "v": "Äpfel ✓" + }, + "formula": null, + "style": 0 + }, + "1": { + "value": { + "t": "Number", + "v": 3.5 + }, + "formula": null, + "style": 2 + } + }, + "2": { + "0": { + "value": { + "t": "Text", + "v": "Pears" + }, + "formula": null, + "style": 0 + }, + "1": { + "value": { + "t": "Number", + "v": 2.0 + }, + "formula": null, + "style": 2 + } + }, + "3": { + "1": { + "value": { + "t": "Number", + "v": 5.5 + }, + "formula": { + "text": "SUM(B2:B3)", + "array": null + }, + "style": 2 + } + } + } + } + }, + "len": 7 + }, + "cols": {}, + "rows": {}, + "default_col_width": 64.0, + "default_row_height": 20.0, + "merges": [], + "freeze": null, + "tab_color": null, + "visibility": "Visible", + "show_gridlines": true, + "show_headings": true, + "show_formulas": false, + "show_zeros": true, + "show_outline_symbols": true, + "summary_below": true, + "summary_right": true, + "right_to_left": false, + "zoom": 100, + "cond_formats": [], + "validations": [], + "tables": [], + "autofilter": null, + "comments": {}, + "hyperlinks": {}, + "charts": [], + "images": [], + "shapes": [], + "sparklines": [], + "slicers": [], + "pivots": [], + "protection": null, + "print": { + "orientation": "Portrait", + "paper": "Letter", + "margins": [ + 0.7, + 0.7, + 0.75, + 0.75, + 0.3, + 0.3 + ], + "print_area": null, + "title_rows": null, + "title_cols": null, + "scale": 100, + "fit_to": null, + "gridlines": false, + "headings": false, + "center_h": false, + "center_v": false, + "header": "", + "footer": "", + "row_breaks": [], + "col_breaks": [], + "different_first": false, + "different_odd_even": false, + "first_header": "", + "first_footer": "", + "even_header": "", + "even_footer": "", + "hf_scale_with_doc": true, + "hf_align_with_margins": true, + "page_order": "downThenOver" + }, + "view_active": { + "row": 0, + "col": 0 + }, + "view_top_left": { + "row": 0, + "col": 0 + }, + "view": "normal" + } + ], + "names": [], + "styles": { + "styles": [ + { + "font": { + "name": "Calibri", + "size": 11.0, + "bold": false, + "italic": false, + "underline": "None", + "strike": false, + "color": "Auto", + "vert": "Baseline", + "charset": null, + "family": null, + "minor": true + }, + "fill": { + "pattern": "None", + "fg": "Auto", + "bg": "Auto" + }, + "borders": { + "left": { + "style": "None", + "color": "Auto" + }, + "right": { + "style": "None", + "color": "Auto" + }, + "top": { + "style": "None", + "color": "Auto" + }, + "bottom": { + "style": "None", + "color": "Auto" + }, + "diag_down": { + "style": "None", + "color": "Auto" + }, + "diag_up": { + "style": "None", + "color": "Auto" + } + }, + "align": { + "h": "General", + "v": "Bottom", + "wrap": false, + "shrink": false, + "indent": 0, + "rotation": 0, + "reading_order": null + }, + "num_fmt": "General", + "protection": { + "locked": true, + "hidden": false + }, + "dxf_stated": { + "bold": false, + "italic": false, + "strike": false, + "underline": false, + "size": false, + "name": false, + "scheme": null, + "protection": false + } + }, + { + "font": { + "name": "Calibri", + "size": 11.0, + "bold": true, + "italic": false, + "underline": "None", + "strike": false, + "color": "Auto", + "vert": "Baseline", + "charset": null, + "family": null, + "minor": true + }, + "fill": { + "pattern": "None", + "fg": "Auto", + "bg": "Auto" + }, + "borders": { + "left": { + "style": "None", + "color": "Auto" + }, + "right": { + "style": "None", + "color": "Auto" + }, + "top": { + "style": "None", + "color": "Auto" + }, + "bottom": { + "style": "None", + "color": "Auto" + }, + "diag_down": { + "style": "None", + "color": "Auto" + }, + "diag_up": { + "style": "None", + "color": "Auto" + } + }, + "align": { + "h": "General", + "v": "Bottom", + "wrap": false, + "shrink": false, + "indent": 0, + "rotation": 0, + "reading_order": null + }, + "num_fmt": "General", + "protection": { + "locked": true, + "hidden": false + }, + "dxf_stated": { + "bold": false, + "italic": false, + "strike": false, + "underline": false, + "size": false, + "name": false, + "scheme": null, + "protection": false + } + }, + { + "font": { + "name": "Calibri", + "size": 11.0, + "bold": false, + "italic": false, + "underline": "None", + "strike": false, + "color": "Auto", + "vert": "Baseline", + "charset": null, + "family": null, + "minor": true + }, + "fill": { + "pattern": "None", + "fg": "Auto", + "bg": "Auto" + }, + "borders": { + "left": { + "style": "None", + "color": "Auto" + }, + "right": { + "style": "None", + "color": "Auto" + }, + "top": { + "style": "None", + "color": "Auto" + }, + "bottom": { + "style": "None", + "color": "Auto" + }, + "diag_down": { + "style": "None", + "color": "Auto" + }, + "diag_up": { + "style": "None", + "color": "Auto" + } + }, + "align": { + "h": "General", + "v": "Bottom", + "wrap": false, + "shrink": false, + "indent": 0, + "rotation": 0, + "reading_order": null + }, + "num_fmt": "0.00", + "protection": { + "locked": true, + "hidden": false + }, + "dxf_stated": { + "bold": false, + "italic": false, + "strike": false, + "underline": false, + "size": false, + "name": false, + "scheme": null, + "protection": false + } + } + ] + }, + "theme": { + "name": "Craft", + "colors": [ + 16777215, + 0, + 15263976, + 927809, + 1400962, + 15298866, + 1665828, + 1023701, + 10496915, + 5154606, + 4618374, + 9855101 + ], + "major_font": "Calibri", + "minor_font": "Calibri", + "major_font_ea": "", + "minor_font_ea": "", + "major_font_cs": "", + "minor_font_cs": "", + "major_font_scripts": [], + "minor_font_scripts": [] + }, + "date_system": "D1900", + "calc": { + "mode": "Automatic", + "iterative": false, + "max_iterations": 100, + "max_change": 0.001, + "precision_as_displayed": false, + "r1c1": false + }, + "active_sheet": 0, + "props": { + "title": "", + "subject": "", + "author": "GridCraft User", + "company": "", + "keywords": "", + "description": "" + }, + "protected_structure": false, + "custom_lists": [], + "cell_styles": [], + "vba_project": null, + "macros": [ + { + "v": 1, + "name": "Fill", + "description": "", + "inputs": [], + "steps": [ + { + "type": "command", + "id": "cell.set", + "params": { + "cell": "C1", + "input": "x" + } + } + ], + "output": { + "onConflict": "ask" + }, + "permissions": [] + } + ] +} \ No newline at end of file diff --git a/crates/engine/tests/golden/kept.json b/crates/engine/tests/golden/kept.json new file mode 100644 index 000000000..0cbc313cf --- /dev/null +++ b/crates/engine/tests/golden/kept.json @@ -0,0 +1,448 @@ +{ + "active_sheet": 0, + "calc": { + "iterative": false, + "max_change": 0.001, + "max_iterations": 100, + "mode": "Automatic", + "precision_as_displayed": false, + "r1c1": false + }, + "cell_styles": [], + "custom_lists": [], + "date_system": "D1900", + "macros": [ + { + "description": "", + "inputs": [], + "name": "Fill", + "output": { + "onConflict": "ask" + }, + "permissions": [], + "steps": [ + { + "id": "cell.set", + "params": { + "cell": "C1", + "input": "x" + }, + "type": "command" + } + ], + "v": 1 + }, + { + "extra": [ + 1, + 2 + ], + "name": "Future", + "v": 2 + } + ], + "names": [], + "props": { + "author": "GridCraft User", + "company": "", + "description": "", + "keywords": "", + "subject": "", + "title": "" + }, + "protected_structure": false, + "sheets": [ + { + "autofilter": null, + "cells": { + "bands": { + "0": { + "rows": { + "0": { + "0": { + "formula": null, + "style": 1, + "value": { + "t": "Text", + "v": "Item" + } + }, + "1": { + "formula": null, + "style": 1, + "value": { + "t": "Text", + "v": "Qty" + } + } + }, + "1": { + "0": { + "formula": null, + "style": 0, + "value": { + "t": "Text", + "v": "Äpfel ✓" + } + }, + "1": { + "formula": null, + "style": 2, + "value": { + "t": "Number", + "v": 3.5 + } + } + }, + "2": { + "0": { + "formula": null, + "style": 0, + "value": { + "t": "Text", + "v": "Pears" + } + }, + "1": { + "formula": null, + "style": 2, + "value": { + "t": "Number", + "v": 2.0 + } + } + }, + "3": { + "1": { + "formula": { + "array": null, + "text": "SUM(B2:B3)" + }, + "style": 2, + "value": { + "t": "Number", + "v": 5.5 + } + } + } + } + } + }, + "len": 7 + }, + "charts": [], + "cols": {}, + "comments": {}, + "cond_formats": [], + "default_col_width": 64.0, + "default_row_height": 20.0, + "freeze": null, + "hyperlinks": {}, + "images": [], + "merges": [], + "name": "Sheet1", + "pivots": [], + "print": { + "center_h": false, + "center_v": false, + "col_breaks": [], + "different_first": false, + "different_odd_even": false, + "even_footer": "", + "even_header": "", + "first_footer": "", + "first_header": "", + "fit_to": null, + "footer": "", + "gridlines": false, + "header": "", + "headings": false, + "hf_align_with_margins": true, + "hf_scale_with_doc": true, + "margins": [ + 0.699999988079071, + 0.699999988079071, + 0.75, + 0.75, + 0.30000001192092896, + 0.30000001192092896 + ], + "orientation": "Portrait", + "page_order": "downThenOver", + "paper": "Letter", + "print_area": null, + "row_breaks": [], + "scale": 100, + "title_cols": null, + "title_rows": null + }, + "protection": null, + "right_to_left": false, + "rows": {}, + "shapes": [], + "show_formulas": false, + "show_gridlines": true, + "show_headings": true, + "show_outline_symbols": true, + "show_zeros": true, + "slicers": [], + "sparklines": [], + "summary_below": true, + "summary_right": true, + "tab_color": null, + "tables": [], + "validations": [], + "view": "normal", + "view_active": { + "col": 0, + "row": 0 + }, + "view_top_left": { + "col": 0, + "row": 0 + }, + "visibility": "Visible", + "zoom": 100 + } + ], + "styles": { + "styles": [ + { + "align": { + "h": "General", + "indent": 0, + "reading_order": null, + "rotation": 0, + "shrink": false, + "v": "Bottom", + "wrap": false + }, + "borders": { + "bottom": { + "color": "Auto", + "style": "None" + }, + "diag_down": { + "color": "Auto", + "style": "None" + }, + "diag_up": { + "color": "Auto", + "style": "None" + }, + "left": { + "color": "Auto", + "style": "None" + }, + "right": { + "color": "Auto", + "style": "None" + }, + "top": { + "color": "Auto", + "style": "None" + } + }, + "dxf_stated": { + "bold": false, + "italic": false, + "name": false, + "protection": false, + "scheme": null, + "size": false, + "strike": false, + "underline": false + }, + "fill": { + "bg": "Auto", + "fg": "Auto", + "pattern": "None" + }, + "font": { + "bold": false, + "charset": null, + "color": "Auto", + "family": null, + "italic": false, + "minor": true, + "name": "Calibri", + "size": 11.0, + "strike": false, + "underline": "None", + "vert": "Baseline" + }, + "num_fmt": "General", + "protection": { + "hidden": false, + "locked": true + } + }, + { + "align": { + "h": "General", + "indent": 0, + "reading_order": null, + "rotation": 0, + "shrink": false, + "v": "Bottom", + "wrap": false + }, + "borders": { + "bottom": { + "color": "Auto", + "style": "None" + }, + "diag_down": { + "color": "Auto", + "style": "None" + }, + "diag_up": { + "color": "Auto", + "style": "None" + }, + "left": { + "color": "Auto", + "style": "None" + }, + "right": { + "color": "Auto", + "style": "None" + }, + "top": { + "color": "Auto", + "style": "None" + } + }, + "dxf_stated": { + "bold": false, + "italic": false, + "name": false, + "protection": false, + "scheme": null, + "size": false, + "strike": false, + "underline": false + }, + "fill": { + "bg": "Auto", + "fg": "Auto", + "pattern": "None" + }, + "font": { + "bold": true, + "charset": null, + "color": "Auto", + "family": null, + "italic": false, + "minor": true, + "name": "Calibri", + "size": 11.0, + "strike": false, + "underline": "None", + "vert": "Baseline" + }, + "num_fmt": "General", + "protection": { + "hidden": false, + "locked": true + } + }, + { + "align": { + "h": "General", + "indent": 0, + "reading_order": null, + "rotation": 0, + "shrink": false, + "v": "Bottom", + "wrap": false + }, + "borders": { + "bottom": { + "color": "Auto", + "style": "None" + }, + "diag_down": { + "color": "Auto", + "style": "None" + }, + "diag_up": { + "color": "Auto", + "style": "None" + }, + "left": { + "color": "Auto", + "style": "None" + }, + "right": { + "color": "Auto", + "style": "None" + }, + "top": { + "color": "Auto", + "style": "None" + } + }, + "dxf_stated": { + "bold": false, + "italic": false, + "name": false, + "protection": false, + "scheme": null, + "size": false, + "strike": false, + "underline": false + }, + "fill": { + "bg": "Auto", + "fg": "Auto", + "pattern": "None" + }, + "font": { + "bold": false, + "charset": null, + "color": "Auto", + "family": null, + "italic": false, + "minor": true, + "name": "Calibri", + "size": 11.0, + "strike": false, + "underline": "None", + "vert": "Baseline" + }, + "num_fmt": "0.00", + "protection": { + "hidden": false, + "locked": true + } + } + ] + }, + "theme": { + "colors": [ + 16777215, + 0, + 15263976, + 927809, + 1400962, + 15298866, + 1665828, + 1023701, + 10496915, + 5154606, + 4618374, + 9855101 + ], + "major_font": "Calibri", + "major_font_cs": "", + "major_font_ea": "", + "major_font_scripts": [], + "minor_font": "Calibri", + "minor_font_cs": "", + "minor_font_ea": "", + "minor_font_scripts": [], + "name": "Craft" + }, + "vba_project": null +} \ No newline at end of file