Title: Cells with field values/drop down menu in word is not recognised as text with _Cells.text · Issue #1489 · python-openxml/python-docx · GitHub
Open Graph Title: Cells with field values/drop down menu in word is not recognised as text with _Cells.text · Issue #1489 · python-openxml/python-docx
X Title: Cells with field values/drop down menu in word is not recognised as text with _Cells.text · Issue #1489 · python-openxml/python-docx
Description: 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 no...
Open Graph Description: 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 f...
X Description: 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 f...
Opengraph URL: https://github.com/python-openxml/python-docx/issues/1489
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cells with field values/drop down menu in word is not recognised as text with _Cells.text","articleBody":"For cells with a field code or a drop down menu, the library does not recognise the text within them.\n\nFor 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\n\n\n\nRunning through the code below\n\n```py\nfrom docx import Document\nimport pandas as pd\n\ndoc = Document(\"C:\\Developer\\example\\exampletable.docx\")\ntables = []\nfor table in doc.tables:\n # initialise df\n df = [['' for _ in range(len(table.columns))] for _ in range(len(table.rows))]\n \n # populate the df with data from table\n for i, row in enumerate(table.rows):\n for j, cell in enumerate(row.cells):\n df[i][j] = cell.text\n \n tables.append(pd.DataFrame(df))\n \nprint(tables[0])\n```\n\nresults in this table\n```\n 0 1\n0 Dropdown\n1 Field value\n2 Normal Text Hello\n```\n\nHere is the files for the above example: [example.zip](https://github.com/user-attachments/files/20238513/example.zip)","author":{"url":"https://github.com/Heikasee","@type":"Person","name":"Heikasee"},"datePublished":"2025-05-16T05:14:19Z","url":"https://github.com/python-openxml/python-docx/issues/1489"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b25c221d-0182-d3e9-03cc-43de8064151e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DD8:3E3DC6:237233:316494:6AFF6592 |
| html-safe-nonce | d84bec84cc48e9eefdcb22032f33ee19063eef48a874f4a19f4b99f177bb54af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REQ4OjNFM0RDNjoyMzcyMzM6MzE2NDk0OjZBRkY2NTkyIiwidmlzaXRvcl9pZCI6IjY2MTg0NTIyMjg3NzQ1MjAyMTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7d21b8dfda7489a8cbdbc97d6cf23124f6ef26dacb873c27a700526a15350196 |
| hovercard-subject-tag | issue:3067957802 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openxml/python-docx/1489/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca43732ab6c6dcc74280358f6b8759fb3baaf7a232fcd618f9a99d3fea2c9d3f/python-openxml/python-docx/issues/1489 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca43732ab6c6dcc74280358f6b8759fb3baaf7a232fcd618f9a99d3fea2c9d3f/python-openxml/python-docx/issues/1489 |
| og:image:alt | 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 f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Heikasee |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git |
| octolytics-dimension-user_id | 3403760 |
| octolytics-dimension-user_login | python-openxml |
| octolytics-dimension-repository_id | 13592924 |
| octolytics-dimension-repository_nwo | python-openxml/python-docx |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13592924 |
| octolytics-dimension-repository_network_root_nwo | python-openxml/python-docx |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8968d6d6acc65d74e4df332d23932dd3fd0502a4 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width