Skip to content

Bottom border missing in table #160

@dt-eric-lefevreardant

Description

@dt-eric-lefevreardant

I'm trying to convert an HTML table like this one, but the border of at the bottom of the table is missing.
Image

Code is:

await HTMLtoDOCX(
    "<table><tr><td>left</td><td>right</td></tr></table>",
    undefined,
    { table: { borderOptions: { size: 1, stroke: "single", color: "000000" } } });

I'm not entirely sure how to interpret the content of the word/document.xml file that is generated (see full file: document.xml), but I noticed those tags:

<w:tcBorders>
  <w:top w:val="single" w:sz="1" w:space="0" w:color="000000"/>
  <w:left w:val="single" w:sz="1" w:space="0" w:color="000000"/>
</w:tcBorders>

and

<w:tcBorders>
  <w:top w:val="single" w:sz="1" w:space="0" w:color="000000"/>
  <w:left w:val="single" w:sz="1" w:space="0" w:color="000000"/>
  <w:right w:val="single" w:sz="1" w:space="0" w:color="000000"/>
</w:tcBorders>

It's as if a <w:bottom> tag should have been there, too.

Did I miss something?

(PS: thanks for taking over the old https://github.com/privateOmega/html-to-docx library; this is much appreciated!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions