By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 894 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

Excel AutoFilter in C#

P: n/a
JM
Anyone know how to do an autofilter on a workbook in C#?

Any snippets of code or reference material would be helpful!
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Refer the following URL
http://support.microsoft.com/?kbid=213628

"JM" wrote:
Anyone know how to do an autofilter on a workbook in C#?

Any snippets of code or reference material would be helpful!

Nov 16 '05 #2

P: n/a
JM
Here is what worked for me

worksheet.get_Range("A1", "H1").Font.Bold = true;
worksheet.get_Range("A1", "H1").Font.Underline = true;
worksheet.get_Range("A1", "H1").HorizontalAlignment =
-4108; // Centre

Range oRng = worksheet.get_Range("A1", "H" + Row); // From
the top left to bottom right

oRng.AutoFilter(1, Type.Missing,
XlAutoFilterOperator.xlAnd, Type.Missing, true);

"AMALORPAVANATHAN YAGULASAMY(AMAL)" wrote:
Refer the following URL
http://support.microsoft.com/?kbid=213628

"JM" wrote:
Anyone know how to do an autofilter on a workbook in C#?

Any snippets of code or reference material would be helpful!

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.