diff --git a/src/file/table/table-width.ts b/src/file/table/table-width.ts index ff203506eb..554654a583 100644 --- a/src/file/table/table-width.ts +++ b/src/file/table/table-width.ts @@ -38,6 +38,10 @@ export class TableWidthElement extends XmlComponent { constructor(name: string, { type = WidthType.AUTO, size }: ITableWidthProperties) { super(name); // super("w:tblW"); - this.root.push(new TableWidthAttributes({ type: type, size: measurementOrPercentValue(size) })); + let tableWidthValue = size; + if (type === WidthType.PERCENTAGE && typeof size === "number") { + tableWidthValue = `${size}%`; + } + this.root.push(new TableWidthAttributes({ type: type, size: measurementOrPercentValue(tableWidthValue) })); } }