fix(xlsx) Caching of formats, fonts, fills and borders on Excel rendering#190
Conversation
|
Thanks — the diagnosis is right (the SDK's 1. The cache must be scoped to a single render, not static.
// same live ExcelHandler instance throughout (resident-server shape)
excel.Set("/Sheet1/A1", new() { ["font.italic"] = "true" });
var first = excel.ViewAsHtml(); // caches the stylesheet arrays
excel.Set("/Sheet1/B1", new() { ["font.bold"] = "true", ["fill"] = "#FF8800" });
var second = excel.ViewAsHtml();
// FAILS: second contains no "font-weight:bold" — the appended xf/font
// is invisible because the cached arrays predate the mutation.Fix: materialize the four arrays once per render (e.g. build them at the 2. Please trim the PR to
We'll add regression tests for the style-lookup fast path on our side when this lands. |
d51a49c to
2046519
Compare
|
I have now rebased and reapplied the fix. |
I noticed slow rendering of some machine generated xlsx files where style was set for each cell.
This PR adds caching to speed up rendering of such files.
Mal til AI …(1).xlsx)