如何使用apache poi 3.6获取A1(单元格地址)的单元格值
问题描述:
我有Excel单元格地址,如A1,A2.因此,如何使用poi3.6以编程方式访问此单元格
I have Excel Cell Address like A1,A2. So, how to access this cell programatically using poi3.6
另一种方法是
row=mySheet.getRow();
cell=row.getCell();
但是我有A1格式的地址...所以,我如何以编程方式访问那些单元格
But i have the address in the format of A1 ... so, how do I access those cell programatically
答
CellReference cr = new CellReference("A1");
row = mySheet.getRow(cr.getRow());
cell = row.getCell(cr.getCol());
有关更多示例,请参见快速指南.
See Quick Guide for more samples.