ms word - Win32 OLE (perl) - resize table column width to text -


i have perl script adds rows text existing table in word document using win32::ole.
now, have resize table's columns match text size (just double-clicking on vertical line between 2 columns) know how set column specific width, can't seem find api resizing column match text size.

can tell me for?

for reference, here code snippet script:

my $tbl = $document->tables(1); $row = $tbl->rows->add(); $row->cells(1)->range()->insertafter($timestamp); $row->cells(2)->range()->insertafter($comment); $row->cells(3)->range()->insertafter($username); # todo: resize columns match content 

have tried cells.autofit() method? e.g. columns.autofit

it seems supported excel 2010 , newer, though.

https://msdn.microsoft.com/en-us/library/office/ff837476.aspx


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -