Apache POI和EXCEL [英] Apache POI and EXCEL

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

问题描述

我使用Apache POI API访问Excel .xlsx文件,使用API​​可以读/写单元格。
我的问题是:如何在Excel GUI中打开.xlsx文件?
如果我尝试这样做,我有同时访问同一资源的冲突(进程无法访问该文件,因为它被另一个进程使用)。
我被告知答案是Excel RTD和c#,c ++或其他语言。
但是我想坚持使用Java,我该怎么办?是否切换到linux一个选项?
谢谢!!!

I'm using Apache POI API to access an Excel .xlsx file, using the API I can read/write cells. My problem is: How can I do that with the .xlsx file opened in Excel GUI? If I try to do that I have conflict arising from concurrent access to the same resource (The process cannot access the file because it is being used by another process). I have been told that the answer is Excel RTD and c#, c++ or other languages. BUT I want to stick with Java,what could I do? Is switching to linux an option? THANKS!!!

推荐答案

AFAIK poi只适用于文件系统,所以没有通过Real-时间数据我想你不应该编辑 xlsx 文件,而如果你想防止损坏,它仍然在excel中打开。

AFAIK poi only works on the file system, so there is no interaction through Real-Time Data. I think you should not edit the xlsx file while it is still open in excel if you want to prevent corruption.

如果你想使用RTD,你应该尝试找到java绑定。我认为他们是基于COM,所以也许JACOB可以帮助你。 http://sourceforge.net/projects/jacob-project/

If you want to use RTD, you should try to find java bindings for that. I think they are COM based, so maybe JACOB can help you. http://sourceforge.net/projects/jacob-project/

另见此讨论: http: //sourceforge.net/p/jacob-project/discussion/375946/thread/946012e8/

哦。顺便说一句。 COM只是Windows,所以我会留在Windows上:)

Oh. Btw. COM is Windows only, so I would stay on Windows :)

这篇关于Apache POI和EXCEL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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