java 如何使用Java打开Excel表格?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4886413/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 08:28:33  来源:igfitidea点击:

How to open an excel sheet using Java?

javaexcel

提问by Prachur

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. whats the process to open and close it using java coding.

我正在尝试制作一个程序,通过该程序我想操作 Excel 工作表中的数据,但只有在打开 Excel 工作表时才会操作数据。使用 java 编码打开和关闭它的过程是什么。

回答by fluminis

You can use POIto 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

回答by Andy

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. 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.

旁注:看起来 JExcel 仅基于文件。这意味着您无法与打开的电子表格进行交互。如果您需要与打开的电子表格进行交互,则必须使用 JNI 或使用 JNI 的库,例如J-Integra COM