I’m re-evaluating Aspose Cells 21.7 and running into an issue clearing filtered data. I beleive this used to work in previous versions.
I have a worksheet with a range of filtered data. I want to remove that filter/clear the filter and show all the data, then create a PDF from that.
My original code was this:
if ( wSheet.HasAutofilter )
{
TestContext.WriteLine("Autofilter detected");
wSheet.AutoFilter.ShowAll();
}
I then updated to try this:
if ( wSheet.HasAutofilter )
{
TestContext.WriteLine("Autofilter detected");
int[] rows = wSheet.AutoFilter.Refresh(false);
wSheet.AutoFilter.ShowAll();
int[] rows2 = wSheet.AutoFilter.Refresh(false);
}
wSheet.RemoveAutoFilter();
In both cases, not all of my filtered data is shown in my PDF, and nor in a save as XLS.
I have attached my test XLS file. The file has a filtered range and then shows what data I should be seeing if the filter was removed.
FilteredAndCommentedCells.zip (8.8 KB)
Thanks.