我无法理解如何在Eclipse中设置Jexel

时间:2022-06-05 22:27:12

I was told JExel was a good way to work with excel files in java, but I'm having trouble understanding how to set it up. I'm playing around in java with different things to expand my knowledge. I thought libraries and such were a good way to start.

有人告诉我,JExel是一个在java中使用excel文件的好方法,但是我很难理解如何设置它。我正在玩java用不同的东西来扩展我的知识。我认为图书馆等是一个很好的开始。

I added my jars - but when I put import jxl.Cell; at the top of my class, it tells me that isn't anything.

我添加了我的罐子 - 但是当我放入导入jxl.Cell;在我班上,它告诉我这不是什么。

I'm trying to ask the users for an excel sheet, but if I'm not using the library correctly, I'm stuck point blank.

我正在尝试向用户询问excel表格,但如果我没有正确使用该库,我就会陷入困境。

I was wondering if someone knew how to give a beginner step by step advice on setting it up in eclipse. I have no where else to turn and am evidently not understanding the steps given.

我想知道是否有人知道如何在eclipse中为初学者提供一步一步的建议。我无处可转,显然不理解给出的步骤。

1 个解决方案

#1


0  

This might be helpful: Importing Jar in Eclipse

这可能会有所帮助:在Eclipse中导入Jar

Once this is done, all you need to do is import it in your java classes. I have never used jexcel so i can't comment on specifics, perhaps import jxl.Cell is not valid? Try simply doing import jxl.* , that will import all of the classes in the jxl library.

完成后,您需要做的就是在java类中导入它。我从来没用过jexcel所以我不能评论具体细节,也许导入jxl.Cell无效?尝试简单地执行导入jxl。*,它将导入jxl库中的所有类。

As a side note, this way of managing libraries with external JARs is fine for small projects while you are just learning, however once you get more advanced I would consider learning how to use Maven, it will make life easier.

作为旁注,这种使用外部JAR管理库的方法对于小型项目来说很合适,但是一旦你学到了更多,我会考虑学习如何使用Maven,它会让生活变得更轻松。

#1


0  

This might be helpful: Importing Jar in Eclipse

这可能会有所帮助:在Eclipse中导入Jar

Once this is done, all you need to do is import it in your java classes. I have never used jexcel so i can't comment on specifics, perhaps import jxl.Cell is not valid? Try simply doing import jxl.* , that will import all of the classes in the jxl library.

完成后,您需要做的就是在java类中导入它。我从来没用过jexcel所以我不能评论具体细节,也许导入jxl.Cell无效?尝试简单地执行导入jxl。*,它将导入jxl库中的所有类。

As a side note, this way of managing libraries with external JARs is fine for small projects while you are just learning, however once you get more advanced I would consider learning how to use Maven, it will make life easier.

作为旁注,这种使用外部JAR管理库的方法对于小型项目来说很合适,但是一旦你学到了更多,我会考虑学习如何使用Maven,它会让生活变得更轻松。