阅读使用C#doc和docx文件,而无需在服务器上安装微软Office [英] Reading doc and docx files using C# without having MS Office installed on server

查看:192
本文介绍了阅读使用C#doc和docx文件,而无需在服务器上安装微软Office的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个项目(asp.net,C#,VB 2010,.NET 4),我需要同时读取DOC和DOCX文件,我已经previosly上传(我已经完成上传一部分)。棘手的部分是,我没有在服务器上安装了MS Office和我不能用它做。

I'm working on a project (asp.net, c#, vb 2010, .net 4) and I need to read both DOC and DOCX files, that I've previosly uploaded (I've done uploading part). Tricky part is that I don't have MS Office installed on server and that I can't use it.

有没有公共图书馆,我可以包括到我的项目,而无需安装任何东西?
两个文档是非常简单的:

Is there any public library that I can include into my project without having to install anything? Both docs are very simple:

NUMBER TAB STRING  
NUMBER TAB STRING  
NUMBER TAB STRING  
...  

我需要提取每一行数字和字符串(段落)

I need to extract number and string for each row (paragraph).

可能有人帮助呢?我要再次说我的方式,我不能安装在服务器上的任何限制重复。

May someone help with this? I should repeat once again that I'm limited in a way that I can't install anything on a server.

推荐答案

有关DOC你可以使用开源库 NPOI

For DOC you can use open source library NPOI.

对于DOCX我建议打开XML API

这篇关于阅读使用C#doc和docx文件,而无需在服务器上安装微软Office的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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