如何使用 Apache POI 获取 Excel 文件中的列名,以确保列按预期排序。
最佳答案
有一个方便的方法:
CellReference.convertNumToColString(cell.getColumnIndex());
获取全名:
private static String getCellName(Cell cell)
{
return CellReference.convertNumToColString(cell.getColumnIndex()) + (cell.getRowIndex() + 1);
}
关于java - 使用 Apache POI 获取 Excel 文件中的列名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8202319/