We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For cells with a field code or a drop down menu, the library does not recognise the text within them.
For example, here is a word table with the first row having dropdown menus, second row having field values and third row just having normal text
Running through the code below
from docx import Document import pandas as pd doc = Document("C:\Developer\example\exampletable.docx") tables = [] for table in doc.tables: # initialise df df = [['' for _ in range(len(table.columns))] for _ in range(len(table.rows))] # populate the df with data from table for i, row in enumerate(table.rows): for j, cell in enumerate(row.cells): df[i][j] = cell.text tables.append(pd.DataFrame(df)) print(tables[0])
results in this table
0 1 0 Dropdown 1 Field value 2 Normal Text Hello
Here is the files for the above example: example.zip
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
For cells with a field code or a drop down menu, the library does not recognise the text within them.
For example, here is a word table with the first row having dropdown menus, second row having field values and third row just having normal text
Running through the code below
results in this table
Here is the files for the above example: example.zip
The text was updated successfully, but these errors were encountered: