Created
May 29, 2019 09:43
-
-
Save adamcheasley/fd4397260df4608587a372bca0f1f77a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import docx | |
from docx.shared import Inches | |
doc = docx.Document() | |
table = doc.add_table(rows=2, cols=2) | |
table.style = 'TableGrid' | |
table.autofit = True | |
table.cell(0, 0).text = 'Time Zone' | |
table.cell(1, 0).text = 'Link' | |
table.cell(1, 1).text = 'https://www.google.com/' | |
for cell in table.columns[0].cells: | |
cell.width = Inches(0.2) | |
doc.save('test3.docx') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment