我正在使用apache poi 3.11,来自CellReference,我可以使用以下代码获取rowIndex和Column Index.
CellReference cr = new CellReference("A1");
row = mySheet.getRow(cr.getRow());
cell = row.getCell(cr.getCol());
Run Code Online (Sandbox Code Playgroud)
但我的rowIndex和columnIndex是动态生成的,如何使用rowIndex和columnIndex获取CellReference?
XSSFRow row = mySheet.getRow(rowIndex);
XSSFCell cell = row.getCell(columnIndex);
Run Code Online (Sandbox Code Playgroud)
使用CellReference类的CellReference(int pRow,int pCol)构造函数和创建的实例的formatAsString方法创建CellReference实例.
| 归档时间: |
|
| 查看次数: |
6228 次 |
| 最近记录: |