[問題] Excel range find

作者: abc95007 (別理我)   2019-01-14 17:13:45
請問使用C#從 excel 裡撈資料時
使用 find 時會遇到尋找頭幾字字串相同時
就把 range 找出來
例如我要尋找 "apples"
如果表格中還存在 "apples_temp", 因為前幾個字相同
也會去尋找 "apples_temp"
是否有類似精準比對的選項?
謝謝!
using Excel = Microsoft.Office.Interop.Excel;
using System.Windows.Forms;
Excel.Application app = new Excel.Application();
Excel.Range Fruits = app.get_Range("A1", "H10");
currentFind = Fruits.Find("apples", Missing.Value,
Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,
Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext,
false,Missing.Value, Missing.Value);

Links booklink

Contact Us: admin [ a t ] ucptt.com