It appears to me that you need to add the raw XML code to accomplish this now. Fortunately this isn't too hard once you do the necessary reverse engineering. :-)
my $xml = '<table:database-ranges>' .
'<table:database-range table:target-range-address="' . $sheetname . '.A1:' . $sheetname . '.U' . $
+row_cnt . '" table:display-filter-buttons="true"/>' .
'</table:database-ranges>';
my $xmlpos = $doc->getElement('//table:table', 0);
$doc->insertElement (
$xmlpos, $xml, position => 'after'
);
In the above example:
$xml is the raw xml we need to insert into our spreadsheet.
$sheetname is the name of the worksheet (a scalar, not a ref to the sheet). Note that some characters in the sheetname, such as a period, will cause this not to work.
A1 is the starting coordinate for the autofilter. U is the ending column, $row_cnt is the number of rows in the auto filter range (you could also parametrize the U).
I also tried using appendElement with similar syntax, but it was nesting the new xml within </table:table> instead of after it. A bug?