mlreportgen.dom.BlockHoleContent Class
R2026bNamespace: mlreportgen.dom
Description
A BlockHoleContent object represents the content for a block hole
defined in a template. A block hole can contain block-level elements such as paragraphs,
tables, and lists.
You do not create BlockHoleContent objects directly. Access them
through the Holes property of a template-based DOM object such as
mlreportgen.dom.Document or mlreportgen.dom.DocumentPart.
The mlreportgen.dom.BlockHoleContent class is a handle class.
Class Attributes
HandleCompatible | true |
ConstructOnLoad | true |
Properties
Methods
Limitations
Before the write position advances past a hole, append content to that hole. After
moveToNextHoleadvances past a hole, appending to that hole causes aholeContentCannotAppenderror.
Examples
Fill Block Holes with a Paragraph and List
import mlreportgen.dom.* d = Document("myReport","docx","myTemplate"); dp = DocumentPart(d,"MySection"); p = Paragraph("Summary text"); dp.Holes("Summary").append(p); list = UnorderedList(["Item 1","Item 2","Item 3"]); dp.Holes("Items").append(list); append(d,dp); close(d); rptview(d);
More About
Version History
Introduced in R2026b