You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Jason <ji...@cetova.com> on 2010/02/02 21:39:27 UTC

AutoFilter

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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org