How do I read a filtered Excel file?

Hello.
I have a pretty big xls-file (of 8 megs). Is it possible to read only filtered rows?

Thanks in advance.


2 Replies

VA Vadim April 23, 2008 07:10 AM UTC

Seems impossible as Excel does filtering at the runtime :(. Any ways to get the filtered rows with XlsIO itself?



YG Yavanaarasi G Syncfusion Team April 24, 2008 12:05 PM UTC

Hi Vadim,

Sorry for the delay in responding.

You can filtered the rows by using the following code snippet:


[C#]
IWorksheet sheet = workbook.Worksheets[0];
//Creating an AutoFilter in the first worksheet. Specifying the Autofilter range.
sheet.AutoFilters.FilterRange = sheet.Range["B4:E19"];


Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com//samples/XlsIO.Windows/73132/main.htm

Please try this and let me know if this helps.

Regards,
G.Yavana




Loader.
Up arrow icon