pqzx / html2docx

Convert html to docx
MIT License
69 stars 49 forks source link

table_style = 'TableGrid' #43

Open krystofbe opened 2 years ago

krystofbe commented 2 years ago

Hi! Thanks for this awesome library! I tried to add borders to my tables and did what the docs told me:

new_parser.table_style = 'TableGrid'

But this raises the error

  File "/Users/krystof/git/myproject/.venv/lib/python3.9/site-packages/htmldocx/h2d.py", line 326, in handle_table
    raise ValueError(f"Unable to apply style {self.table_style}.") from e
ValueError: Unable to apply style TableGrid.

It works when I set the style to Table Grid with a blank between the words.

Does anyone also see this behavior?

krishna-certa commented 1 year ago

@krystofbe TableGrid is not a supported table style. This seems to be a typo. Use Table Grid. All supported styles are listed here.