This information has been removed as its provenance was unclear. The contributor has been contacted.
Any progress on this..
Here is a PERL version which can write autofilters: http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.25/lib/Spreadsheet/WriteExcel.pm Basically one has to write an AutofilterinfoRecord which contains the number of filters. Additionally one has to create an MSODRAWING and an OBJ for each col containing a filter. Sadly, excel always crashes when it tries to read my testfile, although, in BiffViewer they look almost identical to a dump what excel generated. I can provide my testcode which was hacked against the 3.2 FINAL. I also welcome any tipps ;-)
Initial support for auto-filters was committed in r983382. To test-drive you need to build poi from trunk or download the latest daily build from http://encore.torchbox.com/poi-svn-build/ In current version you can only apply auto-filter on a range of cells: sheet.setAutoFilter(CellRangeAddress.valueOf("C5:F200")); Customizing of auto-filter properties (filter criteria, sort, etc.) is not yet supported. The feature is available both for HSSF and XSSF. Yegor
Hi Yegor Kozlov, I need to custom filter the value of a column(based on one of the value of the column) after applying the auto-filter. The below method helps me to apply autofilter for the columns A3 through E3 sheet.setAutoFilter(CellRangeAddress.valueOf("A3:E3")); But if I use the same method for custom filtering, like below. It doesn't work. In this case, I want to filter the rows for the value of column E3 as "Near End" sheet.setAutoFilter(CellRangeAddress.valueOf("E3:Near End")); It did not work and throws - java.lang.IllegalArgumentException error. I tried to use the HSSFAutoFilter class like below, with method 'equals'. It also did not work. HSSFAutoFilter autofilter; autofilter = sheet.setAutoFilter(CellRangeAddress.valueOf("E3")); autofilter.equals("Near End"); Is the custom filtering supported in HSSFAutoFilter for HSSFSheet? If not supported now, when it will be available. I am using the poi 3.15 JAR files. Is there any other way for this. Please provide information on this.
Please note that reopening such an old bug requires developers and interested people to sift through old discussion that is likely not relevant any more. REOPEN means the original bugfix was broken and should be redone. Otherwise it is usually better to create a new bug where you describe your problem and improvement suggestions. You can link back to this bug-entry for reference there. For general usage questions the mailing lists are much better suited. Therefore I am setting this one back to FIXED for now.