if (version == 2003) {// 2003
POIFSFileSystem fs = new POIFSFileSystem(fis);
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheetAt(0);
excelReader.readExcelContent(sheet,realfilename);
} else if (version == 2007) {// 2007
XSSFWorkbook xwb = new XSSFWorkbook(fis);
XSSFSheet sheet = xwb.getSheetAt(0);
excelReader.readExcelContent(sheet,realfilename);
}
/**
* 读取Excel数据内容
* @param InputStream
* @return Map 包含单元格数据内容的Map对象
* @throws SQLException
*/
public Map<Integer, String> readExcelContent(Sheet sheet,String uploadName) throws SQLException {
Map<Integer, String> content = new HashMap<Integer, String>();
// 得到总行数
int rowNum = sheet.getLastRowNum();
BaseDAO db = new BaseDAO();
List<RedBooKPrice> listRBK = new ArrayList<RedBooKPrice>();
// 正文内容应该从第二行开始,第一行为表头的标题
RedBooKPrice rp = null;
for (int i = 1; i <=rowNum; i++) {
Row rows = sheet.getRow(i);
Cell makeDescription = rows.getCell(1);
Cell familyDescription = rows.getCell(5);
Cell yearGroup = rows.getCell(9);
相关推荐
poi 读取03和07excel文档的小例子,含jar包。
使用Poi读取大数据量excel的方法 支持2003和2007的版本
使用poi读取写入复杂excel内容包括样式,工具类
poi 读取excel 03 07 jar包.zip
POI生成Excel POI读取Excel java操作Excel Servlet生成Excel web项目,包含含读取Excel与生成Excel方法
poi读取大数据量excel文件,避免内存溢出,行级操作 根据本网站的资源修改的。 将一些类路径错误全部进行了修正。 另外,需要自己在类路径里,放spring-context.jar和spring-beans.jar包。
利用POI读取excel写入到word 利用POI读取excel写入到word 利用POI读取excel写入到word,压缩包里包含了jar包
poi读取大文件Excel,使用xml格式解析,速度实测50mb文件13s,可指定sheet页内容,带工具类和测试类
读取03和07Excel所需poi包,6个,poi-ooxml,poi-ooxml-schemas
NULL 博文链接:https://witchlovelearning.iteye.com/blog/1986299
JAVA IO操作 POI读取excel的内容
POI读取excel的例子
读取Excel的poi包,,读取Excel的poi包,,读取Excel的poi包,读取Excel的poi包读
NULL 博文链接:https://yxhcquedu.iteye.com/blog/828707
使用poi读取excel内容 所需jar包
poi读取excel并输出到jsp页面
java读取excel 表格数据。 public static void main(String[] args) { String[][] content=POIExcelUtils.read("E:\\1.xlsx"); for(int i=0;... * 读取excel,支持excel 97~03 / excel 07 *
apache poi 读取 Excel 的 jar 包 博文链接:https://wxinpeng.iteye.com/blog/231895
java读写Excel,POI.JAR,Word内容读取
poi读取excel所需jar包,可用来使用poi读写word excel。