Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: update front-page example to use table style
  • Loading branch information
ChenfromChina123 committed Aug 11, 2026
commit d2ff9c1572470646be4240fcdfcfa3cdb04cea66
8 changes: 6 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@ Here's an example of what |docx| can do:
'first item in ordered list', style='List Number'
)

document.add_picture('monty-truth.png', width=Inches(1.25))
try:
document.add_picture('monty-truth.png', width=Inches(1.25))
except FileNotFoundError:
# the image is optional; the example works without it
pass

records = (
(3, '101', 'Spam'),
(7, '422', 'Eggs'),
(4, '631', 'Spam, spam, eggs, and spam')
)

table = document.add_table(rows=1, cols=3)
table = document.add_table(rows=1, cols=3, style='Light Shading Accent 1')
hdr_cells = table.rows[0].cells
hdr_cells[0].text = 'Qty'
hdr_cells[1].text = 'Id'
Expand Down