Title: Failed to read the entire text of a cell in a table · Issue #1390 · python-openxml/python-docx · GitHub
Open Graph Title: Failed to read the entire text of a cell in a table · Issue #1390 · python-openxml/python-docx
X Title: Failed to read the entire text of a cell in a table · Issue #1390 · python-openxml/python-docx
Description: I was iterating over the tables, and extracting the text in each cells. Most of the time the following code works perfectly: for object in document.iter_inner_content(): if type(object)==docx.table.Table: for row in object.rows: for cell...
Open Graph Description: I was iterating over the tables, and extracting the text in each cells. Most of the time the following code works perfectly: for object in document.iter_inner_content(): if type(object)==docx.table...
X Description: I was iterating over the tables, and extracting the text in each cells. Most of the time the following code works perfectly: for object in document.iter_inner_content(): if type(object)==docx.table...
Opengraph URL: https://github.com/python-openxml/python-docx/issues/1390
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failed to read the entire text of a cell in a table","articleBody":"I was iterating over the tables, and extracting the text in each cells. Most of the time the following code works perfectly:\n```\nfor object in document.iter_inner_content():\n if type(object)==docx.table.Table:\n for row in object.rows:\n for cell in row.cells:\n print(cell.text)\n```\nBut in some special occasions, especially when there are numbers in the cells' text, the `cell.text` command failed to extract the entire text. For example the original cell include the text like this:\n\n> 【24#梁南侧腹板近1#台处,多处箍筋锈蚀、混凝土剥落,0.2×0.5m。】\n\nThe `cell.text` command would return a string like this:\n\n> 【24#梁南侧腹板近1#台处,多处箍筋锈蚀、混凝土剥落,0.2×。】\n\nAs you can see, the \"0.5m\" was missing in the extracted text. But the period and the right bracket was extracted, so I suppose it is not because of truncation occurred in the string.\n\nI think this is a bug. The file which I tested the bug is attached to this issue.","author":{"url":"https://github.com/Chenhong-Zhang","@type":"Person","name":"Chenhong-Zhang"},"datePublished":"2024-05-08T05:56:44Z","url":"https://github.com/python-openxml/python-docx/issues/1390"}
| 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:32b02a0f-68ad-706b-fbb6-5c90aa721ede |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DE0:2D1F26:234E03:30CE45:6AFF6595 |
| html-safe-nonce | e9cc9ff7d3e0403183cf9ee357fc859f8edbcfb94063175356136c55de9b5a7d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REUwOjJEMUYyNjoyMzRFMDM6MzBDRTQ1OjZBRkY2NTk1IiwidmlzaXRvcl9pZCI6IjkyMTI1NDAzOTc0MTczNTg3NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c9f54b68f823ef3df74833c86c81a471475ac86aeb1d9c1fece2e9aad3bb1b20 |
| hovercard-subject-tag | issue:2284740973 |
| 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/1390/issue_layout |
| twitter:image | https://opengraph.githubassets.com/01dadb89c734ca6784c6dfb844e78cfed158ae01a5ab350ec5829c08ae736d88/python-openxml/python-docx/issues/1390 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/01dadb89c734ca6784c6dfb844e78cfed158ae01a5ab350ec5829c08ae736d88/python-openxml/python-docx/issues/1390 |
| og:image:alt | I was iterating over the tables, and extracting the text in each cells. Most of the time the following code works perfectly: for object in document.iter_inner_content(): if type(object)==docx.table... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Chenhong-Zhang |
| 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-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width