在Java项目中使用Eclipse依赖项添加Apache POI集成时遇到问题。

huangapple go评论66阅读模式
英文:

Trouble to add Apache POI integration in Java project using eclipse dependencies

问题

我正在尝试创建一个Excel电子表格,我打算使用Apache POI库,但它返回一个错误。我已经添加了JAR文件,但消息仍然相同。还可能出了什么问题?

返回的消息是:
线程“main”中的异常:java.lang.Error:未解析的编译问题:
Workbook无法解析为类型
XSSFWorkbook无法解析为类型
Sheet无法解析为类型
Row无法解析为类型
Cell无法解析为类型

英文:

I'm trying to create an Excel spreadsheet and I intend to use the Apache POI library, but it's returning an error. I've already added the JAR files, but the message remains the same. What else could be wrong?

在Java项目中使用Eclipse依赖项添加Apache POI集成时遇到问题。

The message returned is:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Workbook cannot be resolved to a type
XSSFWorkbook cannot be resolved to a type
Sheet cannot be resolved to a type
Row cannot be resolved to a type
Cell cannot be resolved to a type

在Java项目中使用Eclipse依赖项添加Apache POI集成时遇到问题。

答案1

得分: 1

在将项目重新设置为Maven项目后,我向pom.xml文件中添加了依赖项,应用程序正常运行。

英文:

After restarting the project as Maven project, I added the dependencies to the pom.xml file, and the application worked correctly.

huangapple
  • 本文由 发表于 2023年6月26日 09:54:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76553116.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定