Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从 java 创建 excel 文件时,我需要在我的系统上安装 office 吗?
我认为使用其 API 的 java 必须能够创建 .xls 或 .xlsx 文件。我们将无法打开它?
如果有人知道答案,请告诉我。
您无需 Excel 应用程序即可使用 Java 创建 .xls 或 .xlsx 文件。但是,要打开创建的文件,您需要 Microsoft Excel 或 LibreOffice Calc 包。
您可以使用 JXLS 创建一个简单易用的 Excel 表格。这在后端使用 Apache POI。不过,对于非常复杂的报告,Apache POI 是首选,因为 JXLS 中会出现性能问题。