如何使用 C#.NET 创建 .odt 文件?
注意:我发现了“Creating a Word Doc in C#.NET”,但这不是我想要的。
你知道如何创建 .odt 来从 C# .NET 创建文件吗?
OpenOffice.org 库是否有 .NET 组件或包装器来执行此操作?
Note: I found this "Creating a Word Doc in C#.NET", but that is not what I want.
Do you know how to create a .odt to create file from C# .NET?
Is there a .NET component or wrapper for an OpenOffice.org library to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
看看 AODL(参见 http://odftoolkit.org/projects/odftoolkit/pages/AODL )。
由kame编辑:
新链接
AODL-Wiki
Have a look at AODL (see http://odftoolkit.org/projects/odftoolkit/pages/AODL).
EDIT by kame:
New link
AODL-Wiki
您可以查看 OASIS 标准网站,了解有关 ODT 标准的信息。 据我所知,他们使用基于 XML 的标准,并且有可用于文档标准的 XSD,因此您可以将其与您自己的代码结合使用,以正确的格式构建文档文件。
You can check out the OASIS Standards site for information on the ODT standard. From what I've seen, they're using an XML based standard and have an XSD available for the the document standard, so you could use that in conjunction with your own code to build a document file in the proper format.
您可能对OpenOffice、UNO CLI 语言绑定感兴趣。
You might be interested in OpenOffice, UNO CLI Language Binding.
我昨天在寻找创建电子表格的方法时发现了这个,看起来创建编写器文件非常相似:
http://www.suite101.com/content /creating-an-openoffice-calc-document-with-c-a124112,不要忘记先安装 Oracle 的 Open Office SDK。
不幸的是,我还没有找到一种在不打开文件的情况下创建文件的方法。
I found this one yesterday when looking for a way to create Spreadsheeets, it looks like creating writer files is quite similar:
http://www.suite101.com/content/creating-an-openoffice-calc-document-with-c-a124112, dont forget to install the Open Office SDK from Oracle first.
Unfortunately I have not found a way to create a file without opening it yet.
代码如下所示:
The code would look like this:
OpenOffice 文档 (odt) 是 ZIP 文件。 您可以解压现有文件,通过代码修改 content.xml 文件,然后使用 System.IO.Compression 中的 ZipFile 类再次获取 zip 文件。 开放办公规范
OpenOffice documents (odt) are ZIP files. You can unzip an existing one, modify the content.xml file by code and then use the ZipFile class from System.IO.Compression for example to get a zip file again. Open Office Specification