如何获得最后一列的索引读取Excel文件? [英] How to get the last column index reading excel file?
本文介绍了如何获得最后一列的索引读取Excel文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何阅读使用Apache POI API一个 XLSX
文件时,我得到的最后一列的索引?
How do i get the index of the last column when reading a xlsx
file using the Apache POI API?
有一个 getLastRowNum
方法,但我找不到任何相关的列数...
There's a getLastRowNum
method, but I can't find nothing related to the number of columns...
结果
编辑:
我处理 XLSX
文件
推荐答案
我认为你必须通过行迭代和检查<一href=\"http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFRow.html#getLastCellNum%28%29\"><$c$c>HSSFRow.getLastCellNum()$c$c>他们每个人。
I think you'll have to iterate through the rows and check HSSFRow.getLastCellNum()
on each of them.
这篇关于如何获得最后一列的索引读取Excel文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文