Calculate Formula while Assembling Spreadsheet Documents
Leave feedback
NoteThe example reads the shop data described in The Business Layer.
- Set up the source document template path
- Set up destination report path
- Instantiate DocumentAssembler class
- Set options, DocumentAssemblyOptions.UPDATE_FIELDS_AND_FORMULAS
- Generate report
Get the template from here.
import json
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, DocumentAssemblyOptions
with open("products.json", encoding="utf-8") as f:
products = json.load(f)
assembler = DocumentAssembler()
assembler.options = DocumentAssemblyOptions.UPDATE_FIELDS_AND_FORMULAS
assembler.assemble_document("update-field.xlsx", "update-field-report.xlsx", DataSourceInfo(products, "product"))
The following sample file is used in this example: update-field.xlsx
The following sample file is used in this example: products.json
Binary file (XLSX, 9 KB)
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.