Skip to content

Instantly share code, notes, and snippets.

View peter88213's full-sized avatar
💭
I may be slow to respond.

peter88213

💭
I may be slow to respond.
View GitHub Profile
@peter88213
peter88213 / docx_tinker1.py
Created June 12, 2023 15:54
Change the shades of table cells in a docx 'document.xml' component.
import xml.etree.ElementTree as ET
ns = dict(
ve="http://schemas.openxmlformats.org/markup-compatibility/2006",
o="urn:schemas-microsoft-com:office:office",
r="http://schemas.openxmlformats.org/officeDocument/2006/relationships",
m="http://schemas.openxmlformats.org/officeDocument/2006/math",
v="urn:schemas-microsoft-com:vml",
wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
w10="urn:schemas-microsoft-com:office:word",