Hi

Once I wrote below coding it give error meassage.Error meassage is "Member not found".I wrote red color that show the error meassage is occur.

Microsoft.Office.Interop.Excel.Application xl = new Microsoft.Office.Interop.Excel.Application();
Excel.Workbook xlWorkBook = (Excel.Workbook)xl.Workbooks.Open("D:\\Test\\VOIP_X.xls", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
            Excel.Worksheet xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets("1");
            Excel.Range r  = (Excel.Range)xlWorkSheet.Range("A30", "A30");
             MessageBox.Show(r.Value.ToString());

Thanks
Tank50

Recommended Answers

All 4 Replies

Hi

I think its for create new excel file,but I need to read excel file

Thnaks
Tank50

oRng.Cells(nRows, nCols).Value

By using the above line, you can read as well.

HI

Previously I had Microsoft office 2007,so I installed office 2003 and I used Microsoft 11.0 object Library.Now Its working,

Thanks
Tank50

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.