我有一段 C# 代码,需要在 Java 中使用或转换。 它是使用对 Word 12.0 对象库的引用的代码。
这里是 C# 代码的开头:
使用系统;
使用 System.Collections.Generic;
使用 System.Linq;
使用系统文本;
使用 Microsoft.Office.Interop.Word;
如何在 Java 中使用 C# 或者如何使用 C# 到 Java 的引用重写代码?
谢谢
最佳答案
Apache POI - the Java API for Microsoft Documents :
The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008).
关于c# - 在 Java 中使用 C# 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6253414/