INNER CODE UNIT · Python
row
sangrokjung/claude-forge · scripts/md-to-docx/convert.py:430
row = table.rows[row_idx + 1]
is_last = (row_idx == len(rows) - 1)
for col_idx in range(num_cols):
cell_text = row_data[col_idx] if col_idx < len(row_data) else ''
cell = row.cells[col_idx]
# Zebra striping
if row_idx % 2 == 1:
set_cell_shading(cell, BG_ALT)
# Horizontal borders only
bottom_border = (4, BORDER_COLOR, 'single') if not is_last else (6, BORDER_COLOR, 'single')
set_cell_borders(
cell,
top=None,
bottom=bottom_border,
left=None,