Excel.Range.Find method
Posted
by Sathish
on Stack Overflow
See other posts from Stack Overflow
or by Sathish
Published on 2010-04-12T11:24:49Z
Indexed on
2010/04/12
11:33 UTC
Read the original article
Hit count: 465
I am using Excel interop object and trying to find a date in a specified range by below method
Excel.Range rngFind = WS.get_Range(strFromRange, strToRange).Find(strFind, Type.Missing,
Excel.XlFindLookIn.xlFormulas, Excel.XlLookAt.xlPart, Excel.XlSearchOrder.xlByRows,
Excel.XlSearchDirection.xlNext, false, false, false);
but i get rngFind as null always my strFind = "Sep-08" i tried with both Excel.XlFindLookIn.xlFormulas and Excel.XlFindLookIn.xlValues
my excel file looks like this
Sep-08 Oct-08 Nov-08 Dec-08 Jan-09 Feb-09 Mar-09 Apr-09 May-09 Jun-09 Jul-09
where as wheni click on Sep-08 cell i get 9/1/2008
in the formula field in Excel
i have also tried searching for 9/1/2008 but it varies system by system as per the RegionalSettings Date format...
Please help me. basically i am doing to get the cell address of the finding string
© Stack Overflow or respective owner