Hello,
You can use the tableWidth option applying a 100 pct value or a fixed width (dxa) and also use columnWidths.
MS Word allows working with auto values so you don't need to set the exact cell widths, but some DOCX readers can't work with auto values as MS Word does, so setting cell widths. Google Docs has some limitations when working with DOCX documents.
The easiest approach is setting a 100% value and also column widths, for example, the following code generates a table from left margin to right margin using the default page size:
$docx = new CreateDocx();
$values = array(
array(
11,
12,
13,
14
),
array(
21,
22,
23,
24
),
);
$options = array(
'columnWidths' => array(2100,2100,2100,2100),
'tableWidth' => array('type' => 'pct', 'value' => 100),
);
$docx->addTable($values, $options);
$docx->createDocx('output');
Regards.