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
3 changes: 2 additions & 1 deletion htmldocx/h2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,15 @@ def handle_table(self):

rows = self.get_table_rows(table_soup)
cell_row = 0
docx_cells = self.table._cells
for row in rows:
cols = self.get_table_columns(row)
cell_col = 0
for col in cols:
cell_html = self.get_cell_html(col)
if col.name == 'th':
cell_html = "<b>%s</b>" % cell_html
docx_cell = self.table.cell(cell_row, cell_col)
docx_cell = docx_cells[cell_col + (cell_row * self.table._column_count)]
child_parser = HtmlToDocx()
child_parser.copy_settings_from(self)
child_parser.add_html_to_cell(cell_html, docx_cell)
Expand Down