Reading data from excel 2010 using Microsoft.Office.Interop.Excel

前端 未结 5 1757
后悔当初
后悔当初 2020-12-17 14:43

I am not able to read data in Excel. Here is the code I am using:

using Excel = Microsoft.Office.Interop.Excel;

Excel         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 15:31

    Try this code:

    MessageBox.Show(((Excel.Range)xlRange.Cells[i,j]).Value2.ToString());
    

    This code works sucessfully for me.

提交回复
热议问题