I have an Excel Cell Address like A1, A2. How do I access this cell programmatically using NPOI framework in C#?
Some Java POI example code I found:
CellReference cr = new CellReference("A1");
row = mySheet.getRow(cr.getRow());
cell = row.getCell(cr.getCol());
The Java code you found translates 1:1 into C#:
CellReference
Row
andCol
from that CellReference to lookup the actual cell.Here is some sample code
Do note that referencing an empty Cell will result in an exception. Excel doesn't store non-used cells internally, and (N)POI does not attempt to hide that fact from the developer.