René's URL Explorer Experiment


Title: Table cells with form fields seem to be parsed incorrectly · Issue #689 · python-openxml/python-docx · GitHub

Open Graph Title: Table cells with form fields seem to be parsed incorrectly · Issue #689 · python-openxml/python-docx

X Title: Table cells with form fields seem to be parsed incorrectly · Issue #689 · python-openxml/python-docx

Description: Create and modify Word documents with Python. Contribute to python-openxml/python-docx development by creating an account on GitHub.

Open Graph Description: Create and modify Word documents with Python. Contribute to python-openxml/python-docx development by creating an account on GitHub.

X Description: Create and modify Word documents with Python. Contribute to python-openxml/python-docx development by creating an account on GitHub.

Opengraph URL: https://github.com/python-openxml/python-docx

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Table cells with form fields seem to be parsed incorrectly","articleBody":"Hi,\r\n\r\nIm using python-docx to extract info out of docx files. My code iterates over a 2 column table with where the first column is the \"key\" and the second column the \"value\". \r\n\r\nHowever, cells which have word \"form fields\" in them are not included in the table, which results in an incorrect table setup. My table in word looks like this\r\n\r\n```\r\nDate        01-01-2019 (not a form field)\r\nInitals     A.B.\r\nName        TestName\r\nPC          111111\r\n````\r\n\r\nIn the second column, all values are form fields except the first one. I have the following code to debug this:\r\n\r\n```\r\nfor i in range(0,14):\r\n  print doc.tables[0]._cells[i].text\r\n```\r\n\r\nWhich shows me:\r\n```\r\nDate\r\n01-01-2019\r\nInitials\r\nName\r\nPC\r\n...\r\n```\r\n\r\nSo it seems that something goes wrong while parsing the form fields in the table and instead of inserting an empty field or a blank or whatever, it just moves on with the next cell and creates a corrupted table structure.\r\n\r\nMy questions\r\n1) Are there any plans for supporting form fields in the near future?\r\n2) Wouldn't it be better if the library throws an exception or somehow indicates something went wrong with parsing, instead of building a corrupted internal table state?\r\n\r\nFor reference, this is how a row looks like in XML without form fields:\r\n\r\n```\r\n\t\t\t\t\u003cw:tc>\r\n\t\t\t\t\t\u003cw:tcPr>\r\n\t\t\t\t\t\t\u003cw:cnfStyle w:evenHBand=\"0\" w:evenVBand=\"0\" w:firstColumn=\"1\" w:firstRow=\"0\" w:firstRowFirstColumn=\"0\" w:firstRowLastColumn=\"0\" w:lastColumn=\"0\" w:lastRow=\"0\" w:lastRowFirstColumn=\"0\" w:lastRowLastColumn=\"0\" w:oddHBand=\"0\" w:oddVBand=\"0\" w:val=\"001000000000\"/>\r\n\t\t\t\t\t\t\u003cw:tcW w:type=\"dxa\" w:w=\"1951\"/>\r\n\t\t\t\t\t\u003c/w:tcPr>\r\n\t\t\t\t\t\u003cw:p w14:paraId=\"42042D40\" w14:textId=\"77777777\" w:rsidR=\"008014F0\" w:rsidRDefault=\"008014F0\">\r\n\t\t\t\t\t\t\u003cw:r>\r\n\t\t\t\t\t\t\t\u003cw:t xml:space=\"preserve\">Date \u003c/w:t>\r\n\t\t\t\t\t\t\u003c/w:r>\r\n\t\t\t\t\t\u003c/w:p>\r\n\t\t\t\t\u003c/w:tc>\r\n\t\t\t\t\u003cw:tc>\r\n\t\t\t\t\t\u003cw:tcPr>\r\n\t\t\t\t\t\t\u003cw:tcW w:type=\"dxa\" w:w=\"6496\"/>\r\n\t\t\t\t\t\u003c/w:tcPr>\r\n\t\t\t\t\t\u003cw:p w14:paraId=\"3548CF69\" w14:textId=\"64ED0FF3\" w:rsidP=\"000D46F4\" w:rsidR=\"008014F0\" w:rsidRDefault=\"003A3175\">\r\n\t\t\t\t\t\t\u003cw:pPr>\r\n\t\t\t\t\t\t\t\u003cw:tabs>\r\n\t\t\t\t\t\t\t\t\u003cw:tab w:pos=\"1760\" w:val=\"left\"/>\r\n\t\t\t\t\t\t\t\u003c/w:tabs>\r\n\t\t\t\t\t\t\t\u003cw:cnfStyle w:evenHBand=\"0\" w:evenVBand=\"0\" w:firstColumn=\"0\" w:firstRow=\"0\" w:firstRowFirstColumn=\"0\" w:firstRowLastColumn=\"0\" w:lastColumn=\"0\" w:lastRow=\"0\" w:lastRowFirstColumn=\"0\" w:lastRowLastColumn=\"0\" w:oddHBand=\"0\" w:oddVBand=\"0\" w:val=\"000000000000\"/>\r\n\t\t\t\t\t\t\u003c/w:pPr>\r\n\t\t\t\t\t\t\u003cw:r>\r\n\t\t\t\t\t\t\t\u003cw:t>17-4-2019\u003c/w:t>\r\n\t\t\t\t\t\t\u003c/w:r>\r\n\t\t\t\t\t\u003c/w:p>\r\n\t\t\t\t\u003c/w:tc>\r\n\t\t\t\u003c/w:tr>\r\n```\r\n\r\n\r\nAnd this is how it looks like with a form field\r\n\r\n```\r\n\u003cw:tr w14:paraId=\"7459588F\" w14:textId=\"77777777\" w:rsidR=\"00382944\" w:rsidRPr=\"00A21D4E\" w:rsidTr=\"00D85E3F\">\r\n\t\t\t\t\u003cw:tc>\r\n\t\t\t\t\t\u003cw:tcPr>\r\n\t\t\t\t\t\t\u003cw:cnfStyle w:evenHBand=\"0\" w:evenVBand=\"0\" w:firstColumn=\"1\" w:firstRow=\"0\" w:firstRowFirstColumn=\"0\" w:firstRowLastColumn=\"0\" w:lastColumn=\"0\" w:lastRow=\"0\" w:lastRowFirstColumn=\"0\" w:lastRowLastColumn=\"0\" w:oddHBand=\"0\" w:oddVBand=\"0\" w:val=\"001000000000\"/>\r\n\t\t\t\t\t\t\u003cw:tcW w:type=\"dxa\" w:w=\"1951\"/>\r\n\t\t\t\t\t\u003c/w:tcPr>\r\n\t\t\t\t\t\u003cw:p w14:paraId=\"552E8CDB\" w14:textId=\"2A99DF2E\" w:rsidR=\"00382944\" w:rsidRDefault=\"00382944\">\r\n\t\t\t\t\t\t\u003cw:r>\r\n\t\t\t\t\t\t\t\u003cw:t>Initials\u003c/w:t>\r\n\t\t\t\t\t\t\u003c/w:r>\r\n\t\t\t\t\t\u003c/w:p>\r\n\t\t\t\t\u003c/w:tc>\r\n\t\t\t\t\u003cw:sdt>\r\n\t\t\t\t\t\u003cw:sdtPr>\r\n\t\t\t\t\t\t\u003cw:alias w:val=\"Initials\"/>\r\n\t\t\t\t\t\t\u003cw:tag w:val=\"Initials\"/>\r\n\t\t\t\t\t\t\u003cw:id w:val=\"-1231847748\"/>\r\n\t\t\t\t\t\t\u003cw:placeholder>\r\n\t\t\t\t\t\t\t\u003cw:docPart w:val=\"5C7BC912E04B4694A18A39EF621426E0\"/>\r\n\t\t\t\t\t\t\u003c/w:placeholder>\r\n\t\t\t\t\t\t\u003cw:text/>\r\n\t\t\t\t\t\u003c/w:sdtPr>\r\n\t\t\t\t\t\u003cw:sdtEndPr/>\r\n\t\t\t\t\t\u003cw:sdtContent>\r\n\t\t\t\t\t\t\u003cw:tc>\r\n\t\t\t\t\t\t\t\u003cw:tcPr>\r\n\t\t\t\t\t\t\t\t\u003cw:tcW w:type=\"dxa\" w:w=\"6496\"/>\r\n\t\t\t\t\t\t\t\u003c/w:tcPr>\r\n\t\t\t\t\t\t\t\u003cw:p w14:paraId=\"75DE8320\" w14:textId=\"17F2800A\" w:rsidP=\"001B7C01\" w:rsidR=\"00382944\" w:rsidRDefault=\"003A3175\" w:rsidRPr=\"001B7C01\">\r\n\t\t\t\t\t\t\t\t\u003cw:pPr>\r\n\t\t\t\t\t\t\t\t\t\u003cw:cnfStyle w:evenHBand=\"0\" w:evenVBand=\"0\" w:firstColumn=\"0\" w:firstRow=\"0\" w:firstRowFirstColumn=\"0\" w:firstRowLastColumn=\"0\" w:lastColumn=\"0\" w:lastRow=\"0\" w:lastRowFirstColumn=\"0\" w:lastRowLastColumn=\"0\" w:oddHBand=\"0\" w:oddVBand=\"0\" w:val=\"000000000000\"/>\r\n\t\t\t\t\t\t\t\t\t\u003cw:rPr>\r\n\t\t\t\t\t\t\t\t\t\t\u003cw:lang w:val=\"en-US\"/>\r\n\t\t\t\t\t\t\t\t\t\u003c/w:rPr>\r\n\t\t\t\t\t\t\t\t\u003c/w:pPr>\r\n\t\t\t\t\t\t\t\t\u003cw:r>\r\n\t\t\t\t\t\t\t\t\t\u003cw:t>P.J.\u003c/w:t>\r\n\t\t\t\t\t\t\t\t\u003c/w:r>\r\n\t\t\t\t\t\t\t\u003c/w:p>\r\n\t\t\t\t\t\t\u003c/w:tc>\r\n\t\t\t\t\t\u003c/w:sdtContent>\r\n\t\t\t\t\u003c/w:sdt>\r\n\t\t\t\u003c/w:tr>\r\n```\r\n\r\nThanks ","author":{"url":"https://github.com/HenriHa","@type":"Person","name":"HenriHa"},"datePublished":"2019-06-24T20:41:35Z","url":"https://github.com/python-openxml/python-docx/issues/689"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:881a6703-c67d-3016-987c-04394cdce1e0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB43E:2C0A92:80E55B:94C909:6AFF6589
html-safe-nonce15ca099e6b4a9909024a28a9c039bf604268d221df3a4568e1483afda5b424f3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDNFOjJDMEE5Mjo4MEU1NUI6OTRDOTA5OjZBRkY2NTg5IiwidmlzaXRvcl9pZCI6IjIyODIwNTQ1MTg1OTYxMzQyODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0d2f961bb32546798d77f2d374f3a7994fa1dd883aa2dd33706e04822caa5501
hovercard-subject-tagrepository:13592924
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-openxml/python-docx/issues/689
twitter:imagehttps://opengraph.githubassets.com/ceb1727a713c057bb7edbfdc9dd3986b39dc6df234452ba5ae1eacc91a80dc31/python-openxml/python-docx
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ceb1727a713c057bb7edbfdc9dd3986b39dc6df234452ba5ae1eacc91a80dc31/python-openxml/python-docx
og:image:altCreate and modify Word documents with Python. Contribute to python-openxml/python-docx development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12
turbo-cache-controlno-cache
go-importgithub.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git
octolytics-dimension-user_id3403760
octolytics-dimension-user_loginpython-openxml
octolytics-dimension-repository_id13592924
octolytics-dimension-repository_nwopython-openxml/python-docx
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13592924
octolytics-dimension-repository_network_root_nwopython-openxml/python-docx
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8968d6d6acc65d74e4df332d23932dd3fd0502a4
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-openxml/python-docx/issues/689#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fissues%2F689
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fissues%2F689
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://github.com/python-openxml/python-docx/issues/689
Reloadhttps://github.com/python-openxml/python-docx/issues/689
Reloadhttps://github.com/python-openxml/python-docx/issues/689
https://github.com/python-openxml/python-docx
New issuehttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/689
New issuehttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/689
#1630https://github.com/python-openxml/python-docx/pull/1630
Table cells with form fields seem to be parsed incorrectlyhttps://github.com/python-openxml/python-docx/issues/689#top
#1630https://github.com/python-openxml/python-docx/pull/1630
sdtStructured Document Tags (forms)https://github.com/python-openxml/python-docx/issues?q=state%3Aopen%20label%3A%22sdt%22
https://github.com/HenriHa
HenriHahttps://github.com/HenriHa
on Jun 24, 2019https://github.com/python-openxml/python-docx/issues/689#issue-460086123
scannyhttps://github.com/scanny
sdtStructured Document Tags (forms)https://github.com/python-openxml/python-docx/issues?q=state%3Aopen%20label%3A%22sdt%22
on May 16, 2026https://github.com/python-openxml/python-docx/issues/689#event-25600792331
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-openxml/python-docx/issues/689
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/689
sdtStructured Document Tags (forms)https://github.com/python-openxml/python-docx/issues?q=state%3Aopen%20label%3A%22sdt%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.