我想提出一个计划,使我从Excel文件读取数据,并将它们存储在表中。 我已经使用Apache POI制作的节目和工作正常。 但是,当文件有空白单元格作为这里的一个
我有一些问题。 该计划跳过空白,并读取下一个数据。 谁能帮助我,我会怎么做呢? 我知道有几个职位对这个问题,但我还没有找到有用的东西给我。
从Excel文件读取数据的代码是下面。 正如你可以看到我有3种类型的数据。 我怎么会放弃对空白单元格的选项?
// Create an ArrayList to store the data read from excel sheet.
List sheetData = new ArrayList();
FileInputStream fis = null;
try {
// Create a FileInputStream that will be use to read the
// excel file.
fis = new FileInputStream(strfullPath);
// Create an excel workbook from the file system
HSSFWorkbook workbook = new HSSFWorkbook(fis);
// Get the first sheet on the workbook.
HSSFSheet sheet = workbook.g