如何让IIS通过C#在网页中显示Office Doc的内容? [英] How to have IIS display the contents of an Office Doc in a web page, via C#?

查看:98
本文介绍了如何让IIS通过C#在网页中显示Office Doc的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有如何在DIV或其他HTML容器中显示Word(或其他Office 2016)文档的示例?


我正在使用DNN(www。 DNNSoftware.com)所以我使用IIS作为服务器。


我更喜欢使用Visual Studio 2015+创建一个C#项目来执行此操作。


<我不能成为第一个这样做的人,但却找不到合适的文档来源。我一直在寻找Office的PIA:主要互操作程序集,但我不确定这是否是正确的技术。


我肯定不想强迫文档编辑器"另存为网页(已过滤)",因为这对他们来说很麻烦,而且仍然留下了TON膨胀/不需要的样式信息,如字体,大小等。



Thx,


John


解决方案

Hello John,


Office PIA不提供任何相关信息。


看看类似的
thread
 其中介绍了完成工作的可能方法。


您也可以找到
Office Web Viewer:在浏览器中查看Office文档
文章有用。


Is there a sample of how to display a Word (or other Office 2016) document in a DIV or other HTML container?

I'm using DNN (www.DNNSoftware.com) so am using IIS as the server.

I'd prefer to create a C# project using Visual Studio 2015+ to do this.

I can't be the first one to do this, but haven't found the right source of documentation. I've been searching for Office's PIA's: Primary interop assemblies, but am unsure if this is the right technology.

I sure don't want to force the document editors to "Save As Web Page (Filtered)", as that's a hassle for them, and that still leaves a TON of bloated/unwanted style info like font, size, etc.

Thx,

John

解决方案

Hello John,

Office PIAs don't provide anything for that.

Take a look at the similar thread which describes possible ways for getting the job done.

Also you may find the Office Web Viewer: View Office documents in a browser article helpful.


这篇关于如何让IIS通过C#在网页中显示Office Doc的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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