|
Hi,
You could use the generic selectElementByAttribute() in order to select a table by name, whatever the name (numeric or not). Just remember that, according to the Open Document specification, the XPath expression for table is "//table:table" and the name attribute for a table is "table:name". So, the following code allows you to retrieve a table according to its name, even if this name is numeric:
my $table = $doc->selectElementByAttribute('//table:table', 'table:name', $any_name);
Note that O::O doesn't prevent you from creating tables with numeric names using appendTable() or insertTable() as well:
$doc->appendTable("2001", $rows, $cols);
in addition, you could set a numeric name to an existing table:
$doc->tableName($table, "2001");
but you should check the compatibility with your office software.
|