المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : search on a particular sheet Excel workbook



C# Programming
05-21-2012, 09:43 PM
Good Evening! I try to realize the search on a particular sheet Excel workbook.
I do late binding with a book as:
using Excel = Microsoft.Office.Interop.Excel;private void button1_Click(object sender, EventArgs e) { excelapp = new Excel.Application(); excelapp.Workbooks.Open(@"C:\4.xls", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); }Next, I enter into textbox1, for example, the word TXTMessage, this means that the need to look at the sheet of TXT, and textbox2 - the search term in the third column (for example).

How to implement search?
Please, help me if you can.