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

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

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.