MiniExcel icon indicating copy to clipboard operation
MiniExcel copied to clipboard

Template support formula

Open shps951023 opened this issue 3 years ago • 5 comments

image

shps951023 avatar Apr 14 '21 08:04 shps951023

Please be aware of formula Injection problem

shps951023 avatar Apr 14 '21 09:04 shps951023

Hello,

To clarify, are formulas in templates supported at all? In my tests I have noticed that if the template contains any formulas the resulting file will be broken. Just basic stuff like =C9*E9 or =SUM(F9:F30). Even if those columns are left unchanged this will work for what I need, but of course adding more advanced capabilities will be nice also.

This is definitely going to make the library unusable for my purposes if there is no support for formulas. I really like this library and am happy to fork and create something to support that.

Let me know, thanks.

thirstyape avatar Oct 28 '22 15:10 thirstyape

Turns out the issue I was having is related to inserting DataTables and any formulas below them. As the insertion of multiple rows into a template will create new rows this is something that should be looked at, but different from this issue.

thirstyape avatar Nov 01 '22 17:11 thirstyape

See pull request #491, I had exactly the same issue, turns out the library needed to reindex the file calcChain.xml in the archive. It works for single sheet worbooks, for multiple sheets, the library will need to parse worksheet.xml.rels to get corresponding sheets id.

jsgervais avatar May 09 '23 02:05 jsgervais