I am trying to get the cell name like A1,B1,A2,B2
from an excel sheet.
Here is my code
object objCellText = Cells.GetType().InvokeMember("Item",
BindingFlags.GetProperty,null,Cells,
new object[] { RowIndex, ColIndex });
var CellText = objCellText.GetType().InvokeMember("Value",
BindingFlags.GetProperty, null, objCellText, null);
var CellName = objCellText.GetType().InvokeMember("Name",
BindingFlags.GetProperty, null, objCellText, null);
In the code, Name
property is not working.
Thanks in advance for any help!