How to get the Cell value of A1(Cell Address) using apache poi 3.6

Saravanan picture Saravanan · Nov 25, 2010 · Viewed 25.7k times · Source

I have Excel Cell Address like A1,A2. So, how to access this cell programatically using poi3.6

another way is

 row=mySheet.getRow();
 cell=row.getCell();

But i have the address in the format of A1 ... so, how do I access those cell programatically

Answer

Neeme Praks picture Neeme Praks · Nov 25, 2010
CellReference cr = new CellReference("A1");
row = mySheet.getRow(cr.getRow());
cell = row.getCell(cr.getCol());

See Quick Guide for more samples.