如何使用apache poi 3.6获取A1(单元格地址)的单元格值 [英] How to get the Cell value of A1(Cell Address) using apache poi 3.6
本文介绍了如何使用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.
这篇关于如何使用apache poi 3.6获取A1(单元格地址)的单元格值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文