Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
35 views

I'm trying to create a SOP Word doc out of a JSON with the following structure: { "doc_id": "hydraulic-press", "title": "Hydraulic Press", "...
Liz W.'s user avatar
  • 45
2 votes
0 answers
95 views

I'm trying to write a document using python-docx library. I'm adding some simple text with and then I add page_break after each paragraph. Later on, I save and open the same file again. The ...
abolfazl taghribi's user avatar
0 votes
0 answers
46 views

I’m trying to fill a .docx template using the docxtpl library in Python, but I need to do it in multiple steps, because I can’t load the entire context dictionary into memory at once. The problem is ...
MathW166's user avatar
1 vote
0 answers
75 views

python-docx has a very simple object model: Document -* Paragraph -* Run, and is very easy to work with. However there's one showstopper issue: in some cases consequent runs (e.g. single words) do not ...
andy's user avatar
  • 23
0 votes
0 answers
128 views

I'm writing a code that transforms a Word document into a different format. Well, I've made the rest of the changes, but I'm having a problem with the numbering and bullets. I'd like to keep them. I'...
ZXDe's user avatar
  • 1
0 votes
0 answers
72 views

I am using the python-docx library to create a docx file that contains text and a table right after it. I want to set the text size to 12 and table size to 9 point using styles. But the size of all ...
Comrade Che's user avatar
0 votes
1 answer
97 views

I have the following Word File (test_doc.docx) containing multiple sections and tables. I am only interested in capturing tables from Section 2 — Here's a markdown representation of it: Section 1 ...
corentin ducloux's user avatar
1 vote
1 answer
51 views

I need to fetch the images adress in word document along with text and tables. Using doc.element.body loop I can't get image recognise, using doc.part.rels.values loop I can only get images. If ...
user30342609's user avatar
-1 votes
1 answer
108 views

Script to convert word documents to excel. Works well but fails to keep structure and certain characters like bullet points. import tkinter as tk from tkinter import filedialog import re import os ...
Nick's user avatar
  • 927
0 votes
2 answers
86 views

Problem: put a logo image at top left position of the page. I've tried the following to accomplish the same but it doesn't work as expected: from docx import Document from docx.shared import Mm, Pt ...
user2239318's user avatar
  • 2,826
0 votes
1 answer
105 views

I’m working on a Python script to extract content from a Word document (.docx) and insert it into a SQL Server database. The challenge is that I need to preserve text styles like bold and italic, as ...
Zahra's user avatar
  • 119
0 votes
1 answer
70 views

I'm using python-docx (v1.1.2) and Python 3.11.3 to work on a tool to fix a bunch of Word documents automatically. I've been able to update fonts, titles, texts, headers and footers and tables (their ...
J. Maria's user avatar
  • 436
0 votes
0 answers
41 views

I'm generating a Word document using python-docx that contains images arranged in a table format. The document should: Fit multiple images per page (e.g., 4x4 for word cards). Ensure proper page ...
Superchitah's user avatar
0 votes
1 answer
153 views

I have been trying to write a tool to look at Word documents in a specified path for broken links. I gave up on having it search a folder, thinking I just need to get it to do a document first. With ...
Travis Webb's user avatar
0 votes
0 answers
49 views

I am using pythn-docx(https://github.com/python-openxml/python-docx) to generate a docx file and then converting this docx file into PDF format using unoconv (https://github.com/unoconv/unoconv), ...
Rajan Singh's user avatar
0 votes
0 answers
35 views

I have this code that trying to generate a word document. I have the document working except the image adding. When I try to add a run, the image doesn't show up. When I try to add a picture to the ...
Hayden Dudley's user avatar
0 votes
0 answers
26 views

Is there a way to group textboxes using XML. I have tried using <v:group> as can be seen below but this doesn't seem to work? Ideally I'd like the group to inherit the size of the textbox. <v:...
Brad's user avatar
  • 117
0 votes
1 answer
113 views

I am working on a Flask-based web application that processes multilingual agenda documents. The documents are in DOC/DOCX format and contain structured agenda items that I need to extract and format ...
Binal Dalia's user avatar
0 votes
0 answers
163 views

I have been trying to re-link a .docx file that contains many hyperlinks embedded inside text sections since we decided to change document storage services. So the links on the docx are old and need ...
Picucu's user avatar
  • 11
0 votes
0 answers
44 views

I have a sagemaker pipeline where I output a summary of clustering data in a chart in a csv file. I am trying to update my pipeline to export the chart in a word document instead. Using the python ...
anishabm's user avatar
0 votes
0 answers
22 views

I have a document in docx format generated from a pptx containing slides. I want to resize the slides in the pages of the docx by automation using python libraries. I tried with python-docx and aspose ...
Rémi M's user avatar
0 votes
0 answers
54 views

I'm using Docx and Pandas to create a program that copies data from an Excel sheet to a Word document. I've been running into some errors in VSCode, where I am either thrown a ModuleNotFound error ...
SG0d11's user avatar
  • 21
0 votes
1 answer
54 views

I'm working on a requirement to copy content from a docx file and append it to another, but the mess starts when it comes to charts. I'm using python-docx, and since it does not support charts ...
tnhmcm's user avatar
  • 11
0 votes
1 answer
94 views

Using python-docx my code produces a Word file. In this file I make a table. First kolom is named: onderwerp. Values in this column are subjects. The names of the other columns are the 12 months. In ...
JanP's user avatar
  • 1
0 votes
0 answers
33 views

Good day all, I'm working on a very specific automation which requires a table being added into an existing table. So far I can replace key words in a dictionary. However, I also want to be able to ...
Joseph Joe Soltan's user avatar
0 votes
1 answer
48 views

Is it possible to change a word in a word files Header and Footer using python-docx. Like i would place a {{PLACEHOLDER_TEXT}} and change it to an actual word.
John Wilmer Dela Cerna's user avatar
1 vote
0 answers
66 views

I'm using the python-docx library to extract data from a MS Word document. More precisely, I'm trying to find and merge cells in tables, extract the content of the found cell, and register it as the ...
profpow's user avatar
  • 35
-1 votes
1 answer
266 views

I want to convert any html with a table that has nested tables in its cells. When I try to do this, additional rows appear after the rows in which the nested tables were located. The number of rows ...
Василий Чернов's user avatar
0 votes
1 answer
110 views

For admin reasons I can't edit the PATH variable so I couldn't use pip to install my PyPi and 3rd party libraries/modules, so I worked around it and I installed their source code using the official ...
Giorgio Doveri's user avatar
0 votes
1 answer
122 views

I combined multiple text files into a single text file using simple code: with open("Combined_file.txt", 'w') as f1: for indx1, fil1 in enumerate(files_to_combine): with open(...
ewr3243's user avatar
  • 441
1 vote
1 answer
102 views

I have an input word document that has some tables with cell spacing set to 0.02". I’d like to turn off that cell spacing (or set it to 0) with the code below that uses the python-docx package. ...
Semihcan Doken's user avatar
0 votes
2 answers
108 views

I have a bunch of existing documents. Problem: they have no title. My idea is to open every document and add the (modified) filename as a title. I can't find a way to insert a title at the beginning ...
PeterP's user avatar
  • 3
1 vote
0 answers
89 views

I am working on a python3 script that converts a word docx to a html file. When converting numbered lists, I am having difficulty preserving the original number in a numbered list. I have attached an ...
Harris Charalambous's user avatar
0 votes
1 answer
116 views

I have a Python script which aims to parse a docx Doc to replace codes (which may be unintentionally wrongly written) by text with a hyperlink. I already have the raw and cleaned values from the ...
mug8's user avatar
  • 1
0 votes
1 answer
72 views

I have google this error and find no-one else encounter this ValueError before. You could see from the traceback log below that the error is triggered by my code line bg_color = run.font....
Allan Ruin's user avatar
  • 5,297
0 votes
1 answer
72 views

I have a table with a line at the top of the document. I need to replace that with just the line inside that table and make the line bold as well. I am able to insert a line with add_paragraph and ...
Nikita Sarode's user avatar
0 votes
0 answers
200 views

I'm working on a Python project where I need to extract text from DOCX files, preserving the formatted numbering. I've encountered a peculiar issue that I'm hoping someone can help me solve. The ...
Anshuman Sharma's user avatar
0 votes
1 answer
691 views

My goal is to create a nested numeric list using python-docx and upload to Google Docs. For the present moment, I could handle the level 0 lists and works fine, the problem starts when there is more ...
dfop02's user avatar
  • 133
0 votes
1 answer
70 views

I have a docx file with table graph which can not recognized by doc.tables. Here is the file: https://github.com/python-openxml/python-docx/files/1867861/non_readable_table.docx Same issue was ...
xie186's user avatar
  • 509
0 votes
0 answers
58 views

Since many of the pictures in the PPT are mostly in the form of combinations, I need to output the combined image form and extract it into the document. If it is to convert PPT to PDF, can it solve ...
user23640279's user avatar
0 votes
1 answer
133 views

I am working on my project, where I come across a problem when I am trying to convert my docs document to pdf. When I am trying to convert docs into pdf in linux special character convert in different ...
Kskrishna's user avatar
1 vote
3 answers
288 views

I need to generate lots of similar one-page content in a single docx file for personal purposes, so I have created a Python script to automate that. Some of this content is a numbered list, but ...
Glenn's user avatar
  • 185
0 votes
1 answer
211 views

I am currently confused on how to insert a table in the middle of a document, like is it possible to change a text placeholder into a table in python? For example: *** PARAGRAPH **** TEXT_PLACEHOLDER *...
John Wilmer Dela Cerna's user avatar
0 votes
1 answer
96 views

i am working on creating a word file with Docx Python, and at some point I need to surround a specific text or word in a paragraph with borders. p6 = document.add_paragraph() p6.alignment = ...
babeni nelson's user avatar
1 vote
1 answer
77 views

I am trying to generate a Word document where each word is on a separate page and has a specific amount of spacing before the paragraph. I am using the python-docx library to create the Word document. ...
Rashid mehmood's user avatar
0 votes
1 answer
104 views

Some writing systems (scripts) have been represented in "hacked fonts" by changing the glyphs of characters in ASCII or Arabic or other ranges. For example, the shape of the glyph for "...
Sven Oly's user avatar
0 votes
2 answers
131 views

I want to put two logo images in the header of the document. One logo should stay at the very left and the other at the very right of the word file. Below is my code, but this sets both logos on the ...
Amisha Saha's user avatar
0 votes
2 answers
61 views

I want to extract all the tables in a document, process them, and then paste the new tables and the text of the document into another document in the original order. But in Python-docx, paragraphs and ...
Sword Lina's user avatar
1 vote
1 answer
41 views

I currently have a paragraph as a header that is Pt48 in size and I want to create a new line break using add_break() which works perfectly fine but it inherits the top paragraph character size. Is ...
ThisQRequiresASpecialist's user avatar
1 vote
1 answer
168 views

I have a docx file with unstructured text that looks like the following: docx File Prep Northern Kitchen Number One K01-24-01-P01 $132,500 Background: None Project Description: Some long ...
Noa Mao's user avatar
  • 11

1
2 3 4 5
29