如何使用 apache poi 3.6 获取 A1(Cell Address) 的 Cell 值 [英] How to get the Cell value of A1(Cell Address) using apache poi 3.6

查看:42
本文介绍了如何使用 apache poi 3.6 获取 A1(Cell Address) 的 Cell 值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有像 A1、A2 这样的 Excel 单元格地址.那么,如何使用 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(Cell Address) 的 Cell 值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆