简体   繁体   English

如何使用Java打开Excel工作表?

[英]How to open an excel sheet using Java?

I am trying to make a program through which i want to manipulate data in the excel sheet, But data is being manipulated only when the excel sheet is open. 我正在尝试制作一个程序,通过该程序我可以操纵excel工作表中的数据,但是仅当excel工作表打开时才对数据进行操纵。 whats the process to open and close it using java coding. 使用java编码打开和关闭它的过程是什么。

You can use POI to read and write Excel sheets. 您可以使用POI读写Excel工作表。

This article is interesting to understand how to use it : 本文对于了解如何使用它很有趣:

http://onjava.com/pub/a/onjava/2003/04/16/poi_excel.html http://onjava.com/pub/a/onjava/2003/04/16/poi_excel.html

Hey look, there's a tutorial on how to do this link from the JExecel website! 嘿,JExecel网站上有一个有关如何执行此链接的教程!

http://www.andykhan.com/jexcelapi/tutorial.html http://www.andykhan.com/jexcelapi/tutorial.html

Side note: It looks like JExcel is file based only. 旁注:看来JExcel仅基于文件。 This means you can't interact with an open spreadsheet. 这意味着您无法与打开的电子表格进行交互。 If you need to interact with an open spreadsheet you will have to use JNI or a library such as J-Integra COM , which uses JNI. 如果需要与打开的电子表格进行交互,则必须使用JNI或使用JNI的库(例如J-Integra COM)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM