diff --git a/src/file/table/table-properties/table-width.ts b/src/file/table/table-properties/table-width.ts index 957fe49094..a463e958df 100644 --- a/src/file/table/table-properties/table-width.ts +++ b/src/file/table/table-properties/table-width.ts @@ -15,6 +15,7 @@ class TableWidthAttributes extends XmlAttributeComponent { export class PreferredTableWidth extends XmlComponent { constructor(type: WidthType, w: number) { super("w:tblW"); - this.root.push(new TableWidthAttributes({ type, w })); + const width: number | string = type === WidthType.PERCENTAGE ? `${w}%` : w; + this.root.push(new TableWidthAttributes({ type: type, w: width })); } }