__init__ constructor
Leave feedback
On this page
Initializes a new DocumentTable using the default DocumentTableOptions.
def __init__(self, document_path, index_in_document):
...
| Parameter | Type | Description |
|---|---|---|
| document_path | str |
The path to a document containing the table to be accessed. |
| index_in_document | int |
The zero‑based index of the table in the document. |
Initializes a new DocumentTable instance.
def __init__(self, document_path, index_in_document, options):
...
| Parameter | Type | Description |
|---|---|---|
| document_path | str |
The path to a document containing the table to be accessed. |
| index_in_document | int |
The zero-based index of the table in the document. |
| options | DocumentTableOptions |
A set of options controlling extraction of data from the table. If None, default options are applied. |
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTable, DocumentTableOptions
options = DocumentTableOptions()
options.max_row_index = 3
table = DocumentTable("managers.docx", 1, options)
assembler = DocumentAssembler()
assembler.assemble_document(
"importing-word-processing-table-into-presentation.pptx",
"importing-word-processing-table-into-presentation-report.pptx",
DataSourceInfo(table, "table")
)
```
## __init__ {#document_stream-index_in_document}
Initializes a new DocumentTable instance using default DocumentTableOptions.
```python
def __init__(self, document_stream, index_in_document):
...
| Parameter | Type | Description |
|---|---|---|
| document_stream | io.RawIOBase |
The stream containing a document with the table to be accessed. |
| index_in_document | int |
The zero-based index of the table in the document. |
Initializes a new DocumentTable instance.
def __init__(self, document_stream, index_in_document, options):
...
| Parameter | Type | Description |
|---|---|---|
| document_stream | io.RawIOBase |
The stream containing a document with the table to be accessed. |
| index_in_document | int |
The zero‑based index of the table in the document. |
| options | DocumentTableOptions |
A set of options controlling extraction of data from the table. If None, default options are applied. |
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTable, DocumentTableOptions
options = DocumentTableOptions()
options.max_row_index = 3
table = DocumentTable("managers.docx", 1, options)
assembler = DocumentAssembler()
assembler.assemble_document(
"importing-word-processing-table-into-presentation.pptx",
"importing-word-processing-table-into-presentation-report.pptx",
DataSourceInfo(table, "table")
)
- class
DocumentTable
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.