使用c#.net自动打开办公文档(.odt) [英] Automate open office document (.odt) using c#.net

查看:134
本文介绍了使用c#.net自动打开办公文档(.odt)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello开发人员,



我正在努力使用C#.Net自动化Open Office文档。我在使用Microsoft互操作库的办公自动化方面做了一些工作。但是在Open Office的情况下,我发现了像AODL库这样的东西。



我从Apache网站下载了它,并提供了我的AODL.dll文件项目的参考。不幸的是我无法创建新的odt文件的任何实例。



有一些例子在 AODL代码段 [ ^ ]但是我仍然没有正确获取任何文档对象。



TextDocument document = new TextDocument();在这里,即使在引用AODL lib之后,我也缺少TextDocument类。我想我实际上缺少一些OOPS技巧来调用所有对象。



请在网上建议任何我可以找到AODL全部实施的地方。任何小而完整的代码片段及其实现都将为我做。

Hello developer,

I am struggling to automate Open Office document using C# .Net. I have done some work regarding office automation using Microsoft interope libraries. But in case of Open Office I have found something like AODL libraries.

I have downloaded it from the Apache web site and gave reference to my project of the AODL.dll file. Unfortunately I am not able to create any instance of new odt file.

There are examples given on AODL snippets[^] but still i am not getting any even document object properly.

TextDocument document = new TextDocument(); here I am missing TextDocument class even after referring AODL lib. I guess I am actually missing some OOPS tricks to invoke all object.

Please suggest any place on the net where I can find total implementation of AODL. Any small but complete snippet along with its implementation will do for me.

推荐答案

嗨评价,

这里http://wiki.openoffice.org/wiki/AODL_example_17 [ ^ ]示例NUnit测试将显示如何使用AODL创建新的OpenDocument文本文档,并使用新的OpenOfficeLib将其发送到打印机。



这里 http://aodl.sourceforge.net/about.html [ ^ ]是AODL的另一个例子

该库的目的是开发人员可以以面向对象的方式构建他的Open Documents。该库使用Mapper模式隐藏用户的xml处理。最后知道库的某些部分已经存在。请参阅以下示例。



我希望这会对您有所帮助

祝你好运!



Alex
Hi comred,
here http://wiki.openoffice.org/wiki/AODL_example_17[^] example NUnit test will show how to create a new OpenDocument text document by using AODL and send it to a printer by using the new OpenOfficeLib.

Here http://aodl.sourceforge.net/about.html[^] is another example of AODL
The aim of the library is that a developer can build his Open Documents in an objectoriented way. The library uses the Mapper pattern to hide the xml handling for the user. Up to know some parts of the library already exists. See the following example.

I hope this will help you
Good luck comred!

Alex


这篇关于使用c#.net自动打开办公文档(.odt)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆