1. GroupDocs Documentation
  2. /
  3. GroupDocs.Assembly Product Family
  4. /
  5. GroupDocs.Assembly for Python
  6. /
  7. Developer Guide
  8. /
  9. Advanced Usage
  10. /
  11. Loading Multiple DocumentTable Objects from a Single File as a Single Operation

Loading Multiple DocumentTable Objects from a Single File as a Single Operation

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Assembly MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-assembly -- dnx GroupDocs.Assembly.Mcp --yes
Folders, licensing and more →
Note
The example reads the shop data described in The Business Layer.

Loading Multiple DocumentTable Objects

GroupDocs.Assembly for Python via .NET API provides the ability to load multiple DocumentTable objects from a single file as a single operation. Following classes and interfaces of the GroupDocs.Assembly.Data namespace have been added:

Moreover, following properties of the GroupDocs.Assembly.Data.DocumentTable class have been added:

  • Name
  • IndexInDocument

Data Source Document

Template

Loading DocumentTableSet using Default Options

from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTableOptions, DocumentTableSet

def load_table(args):
    # The first row of every table holds its column names
    options = DocumentTableOptions()
    options.first_row_contains_column_names = True
    args.options = options

tables = DocumentTableSet("multiple-tables.docx", load_table)
tables.tables[0].name = "Planets"
tables.tables[1].name = "Persons"
tables.tables[2].name = "Companies"

assembler = DocumentAssembler()
assembler.assemble_document("several-tables.pptx", "several-tables-report.pptx", DataSourceInfo(tables))

The following sample file is used in this example: several-tables.pptx

The following sample file is used in this example: multiple-tables.docx

Binary file (PPTX, 36 KB)

Download full output