We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reading Filtered data from an excel file

Hi,


I have an excel file with some filter applied over a column. How can I read the excel file along with the filtered values. Is there any method that allows reading the filtered data.

Thanks,
Praba

Hi,


Well, after applying filters to the data, the rows are not removed from the data model but are set as hidden, it is MS Excel behavior. So please use Row.isHidden() method to get those filtered rows in the column only:
e.g
Sample code:
[Java]

for (i = 1; i < rowCount; i++) {

Row row= cells.getRows().get(i);

if(!row.isHidden())

System.out.println(“Row” + i + “:”

+ cells.get(i, 0).getStringValue() + “\t”);

}


Thank you.