MiniExcel icon indicating copy to clipboard operation
MiniExcel copied to clipboard

Readonly file (not released properly) and issue with formulas in xl/calcChain.xml

Open jsgervais opened this issue 2 years ago • 2 comments

Excel Type

  • [X] XLSX
  • [ ] XLSM
  • [ ] CSV
  • [ ] OTHER

Upload Excel File

mini_TotalEnVigueur (1).xlsx

Please attach your issue file by dragging or droppng, selecting or pasting them.

warning readonly image

warning for an issue in calcChain.xml image

calcChain.xml content from templatate and before excel auto fix

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<calcChain xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><c r="M6" i="1" l="1"/><c r="L6" i="1"/><c r="K6" i="1"/><c r="J6" i="1"/><c r="N6" i="1"/></calcChain>

calcChain.xml content after fixing by excel

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<calcChain xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><c r="N393" i="1" l="1"/><c r="M393" i="1"/><c r="L393" i="1"/><c r="K393" i="1"/><c r="J393" i="1"/></calcChain>

MiniExcel Version

current, 1.30.3

Description

Excel Line 6 contain formulas that are pushed down by an IEnumerable field one line 5, but isn't updated in xl/calcChain.xml

Excel file not released properly, when opening it's in read only mode because being 'edited' by another user. Generated excel file still in read-only (no released properly). MniExcel not disposed properly?

jsgervais avatar May 08 '23 12:05 jsgervais

I think formulas in excel templates sheets needs to be indexed in calcChain.xml.

here's the formulas in my generated template (388 rows added) image

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<calcChain xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><c r="M393" i="1" l="1"/><c r="K393" i="1"/><c r="J393" i="1"/><c r="N393" i="1"/><c r="L393" i="1"/></calcChain>

calcChain looks like an index of all the formulas cell, row, sheed index -- i.e. <c r="J393" i="1"/>

jsgervais avatar May 08 '23 13:05 jsgervais

the calchain requires parsing _rels/workbook.xml.rels to get worksheet indexes rid#

calcChain.xml content looks like this image

r = columrow, i = sheet index

jsgervais avatar May 08 '23 21:05 jsgervais