Thank you,
I am currently converting an application from Vb.Net Interop to the XLSIO language and this is an area that, in interop, is 1 line of code and occurs nearly instantly. The code below took well over 4 minutes and by then it was apparent it would not work. I converted this into VB.net (from C#). Is my code wrong? There are 60 thousand lines it has to go through, so quite a long time.
Worksheet.AutoFilters.FilterRange = Worksheet.UsedRange
Dim filter As IAutoFilter = Worksheet.AutoFilters(FilterColumn)
filter.AddTextFilter(New String() {"Fruits"})
Dim Range = Worksheet.AutoFilters.FilterRange
Dim row As Integer = Range.Row
Dim lastRow As Integer = Range.LastRow
For i As Integer = row + 1 To lastRow
Dim storange As RowStorage = WorksheetHelper.GetOrCreateRow((TryCast(Worksheet, IInternalWorksheet)), i - 1, True)
If Not storange.IsHidden Then
Worksheet.DeleteRow(i)
i -= 1
lastRow -= 1
End If
Next
For j As Integer = 0 To Worksheet.AutoFilters.Count - 1
Dim filterImpl As AutoFilterImpl = TryCast(Worksheet.AutoFilters(j), AutoFilterImpl)
filterImpl.RemoveDynamicFilter()
Next