解决XSSFWorkbook的问题 - Java - POI .jar [英] Issues resolving XSSFWorkbook - Java - POI .jar

查看:1016
本文介绍了解决XSSFWorkbook的问题 - Java - POI .jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试升级Java应用程序以处理.xlsx,使用比现有POI库更新的POI库。我遇到的问题类似于答案评论中提到的问题: Apache POI,同时使用XSSF和HSSF

I'm trying to do work upgrading a Java application to handle .xlsx, using a newer POI library than our existing one. I'm having issues similar to those mentioned in the comments to the answer here: Apache POI, using both XSSF and HSSF

我指的是新的ss.usermodel,但它一直告诉我它无法解析XSSF工作簿声明:

I'm pointing the new ss.usermodel, but it keeps telling me it can't resolve the XSSF workbook declaration:

Workbook xlsImport = new XSSFWorkbook();

我挖掘了他们的一些文档,发现XSSFWorkbook不是org.apache的一部分。 poi.ss.usermodel。它是org.apache.poi.xssf.usermodel.XSSFWorkbook的一部分。但我没有poi.xssf导入。我指的是错的吗?我正在使用POI 3.7感谢您提供的任何帮助。

I dug through some of their documentation and saw that XSSFWorkbook isn't a part of org.apache.poi.ss.usermodel. It's a part of org.apache.poi.xssf.usermodel.XSSFWorkbook. But there's no poi.xssf for me to import. Am I pointing to the wrong thing? I'm using POI 3.7 Thanks for any help you can provide.

推荐答案

您需要包含poi-ooxml罐子才能获得XSSF库。 poi jar只有HSSF库。

You need to include the poi-ooxml jars to get the XSSF library. The poi jar only has the HSSF libraries.

这篇关于解决XSSFWorkbook的问题 - Java - POI .jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆