c# - 在 Java 中使用 C# 代码

标签 c# java

我有一段 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/

相关文章:

java - 无法查看 SOAP 调用中的回复

java - 在字符串中的特殊字符之间搜索子字符串

c# - XPath 和 Linq2Xml 哪个更好

c# - 如何使用linqtotwitter V3

java - 每个远程主机具有不同管道的 UDP 无法正常工作

java - Spring Integration FileReadingMessageSource 使用 UseWatchService

java - HashSet vs ArrayList CPU 使用率高

c# - 在自定义 C# PowerShell Cmdlet 中确定是否指定了 -Verbose

c# - 启动后启用/禁用身份验证选项

c# 正则表达式与平衡组没有响应