I am generating a Sheet using POI. I am able to set the advance filters by using
the following code:

Name newName = wb.createName();
newName.setNameName("_FilterDatabase");
newName.setSheetIndex(sheetNumber++);
StringBuffer buf = new StringBuffer();
buf.append(sheet.getSheetName()).append("!$A$3:$");
buf.append(letters[numberOfColumns / 26]).append(letters[(numberOfColumns % 
26)])
                                        .append("$");
buf.append(numberOfRows + 2);
newName.setRefersToFormula(buf.toString());

When I open the Workbook I have created I am able to see the advance filter by
going to Data | Sort & Filter | Advanced but I am unable to turn the Filter on.
My desired result is to have the Filter button selected when opening the
workbook. Is there some other Name I should be using to turn the Filter on?


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to