我用谷歌搜索“Open Office C#”并找到了一个经常重复出现的教程:http://www.opendocument4all.com/download/OpenOffice.net.pdf
问题出在这部分(pdf 中的片段):
Change from the Visual Studio window to a Explorer window. Move to the CLI assemblies folder. You will find them in your OpenOffice program installation path in the folder named “assembly”. In this folder you should see the following .net assemblies.
我没有这个“程序集”文件夹。我导航到: C:\Program Files (x86)\OpenOffice.org 3
它根本不存在。我必须使用 C# 创建报告。
请您参考如下方法:
根据 OP 上面的评论,目标是创建 DOC 或 DOCX:
要创建 DOCX,有一个免费选项 (OpenXML from MS) 可用...
用于创建较旧的 DOC 格式(在许多其他内容中有例如 Aspose.Words(商业 - 只是一个快乐的客户,没有附属关系)。
编辑 - 根据评论:
以上所有选项均独立于 Word 工作(即不需要在计算机上存在/安装 Office)。
