Uncategorized

pandas – How I can deepcopy cell (containing image and Colorful texts) from excel in a cell in table in word using python?


I want to copy a cell in excel , that cell containing an image and text with colors , I worked with openpxl and python docx , i tried with bellow code but it didn’t well worked I can’t see the image and the style of the text in Word’s table cellenter image description here

import openpyxl
wb_obj = openpyxl.load_workbook("test.xlsx")
sheet_obj = wb_obj.active
cell_obj = sheet_obj.cell(row=10, column=10)
from docx import Document
doc=Document('test.docx')
table=doc.tables[0]
table.cell(0,0).text=cell_obj.value
doc.save('test.docx')



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *