Numbered List in Text Document
Leave feedback
NoteIn this article, we will use GroupDocs.Assembly to generate a Numbered List report in Text Document format.
NoteThe example reads the shop data described in The Business Layer.
As a report developer, you are required to describe the services you are providing with the following key requirements:
- The report must show the products in the numbered list.
- The report must be generated in the Text Document.
We provide support for the following products:
<<foreach [in products]>><<[NumberOf()]>>. <<[ProductName]>>
<</foreach>>
TipFor detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.
Please download the sample Numbered List document we created in this article:
import json
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
with open("products.json", encoding="utf-8") as f:
products = json.load(f)
assembler = DocumentAssembler()
assembler.assemble_document("numbered-list.txt", "numbered-list-report.txt", DataSourceInfo(products, "products"))
The following sample file is used in this example: numbered-list.txt
The following sample file is used in this example: products.json
We provide support for the following products:
1. Harbor Blend whole bean coffee
2. Lighthouse Espresso beans
3. Aged harbour cheddar
4. Chestnut honey
5. Oat and honey biscuits
6. Cold-pressed olive oil
7. Smoked sea salt
8. Smoked gouda
9. Autumn Harvest apple butter
[TRUNCATED]
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.