MiniExcel
MiniExcel copied to clipboard
Template support formula
Please be aware of formula Injection problem
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.
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.
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.