Changing Automatically Detected Types of DocumentTable Columns

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 →

API provides the ability to change automatically detected types of DocumentTable columns. The Type property setter has been added to the GroupDocs.Assembly.Data.DocumentTableColumn class.

Moreover, The Relations property of the GroupDocs.Assembly.Data.DocumentTableSet class has been added.

Data Source Document

Template

Changing Document Table Column Type

Note
The example reads the shop data described in The Business Layer.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTable, DocumentTableOptions

options = DocumentTableOptions()
options.first_row_contains_column_names = True
table = DocumentTable("managers.docx", 1, options)
table.columns["Total_Contract_Price"].type = float

assembler = DocumentAssembler()
assembler.assemble_document("changed-column-type.pptx", "changed-column-type-report.pptx", DataSourceInfo(table, "Managers"))

The following sample file is used in this example: changed-column-type.pptx

The following sample file is used in this example: managers.docx

Binary file (PPTX, 36 KB)

Download full output