如下内容段是关于java读取excel文件的内容,应该能对各朋友有所用途。

package com.zsmj.utilit;

import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
public class ParseExcel {

private void parseExcel(String excelFile)throws IOException {

HSSFRow row=null;
String data=null;
row =sheet.getRow(i);
case HSSFCell.CELL_TYPE_BLANK:
data="";
break;
case HSSFCell.CELL_TYPE_NUMERIC:
data=(long)row.getCell((short)j).getNumericCellValue()+"";
break;
default:
data=row.getCell((short)j).getStringCellValue();
break;
}
System.out.print(data+"t");
}
System.out.println();
}
}
public static void main(String[] args)throws IOException {
new ParseExcel().parseExcel(args[0]);
}

}






相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-06-15
  • 2021-06-19
猜你喜欢
  • 2022-01-14
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-11-20
  • 2021-05-28
  • 2021-12-30
相关资源
相似解决方案