英文:
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?
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
答案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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论