我想讀一個Excel表格 所以我想讀我的第一列數據和迭代所有行然後第二列 所以如何做到這一點。如何迭代第一列然後行讀取在Excel中的Excel表格
我已經使用行迭代先再依次coloumn
Iterator <Row> rowIterator = sheetName.iterator();
while (rowIterator.hasNext()) {
Row row = rowIterator.next();
Iterator <Cell> cellIterator = row.cellIterator();
while (cellIterator.hasNext()) {
Cell cell = cellIterator.next();
}
}
[這](http://stackoverflow.com/questions/1516144/how-to-read-and-write-excel-file-in-java)可能有助於 – andreim
檢查[此](http://stackoverflow.com/questions/27499147/reading-specific-column-of-excel-into-java-program)和[this](http://stackoverflow.com/questions/5551815/read-a -single-column-of-excel-sheet-using-java) – Sajjad