解析Node.JS中的Microsoft Office文件 [英] Parse Microsoft Office files in Node.JS

查看:292
本文介绍了解析Node.JS中的Microsoft Office文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个Web应用程序,用户可以上载Microsoft Office Document文件。现在,我们的服务器正在运行带有Express.js的Node.JS,我们托管在Heroku上。因此,我不认为我可以安装程序,如abiword或catdoc。我可以处理文件上传,但无法解析文档的内容。

I'm working on a web application where users can upload Microsoft Office Document files. Right now, our server is running Node.JS with Express.js and we're hosted on Heroku. Because of this, I don't think that I can install programs such as abiword or catdoc. I can handle the file uploads, but can't parse the contents of the document.

如何阅读文档文件的内容?然后将信息放入数据库中。保持基本格式(粗体,斜体,下划线)是很好的,但不是必需的。

How can I read the contents of the doc file? The information will then be put into a database. It'd be nice to preserve basic formatting (bold, italic, underline), but not essential.

推荐答案

似乎是可以通过直接执行Word的NPM获得的任何东西,您可以使用REST API通过另一个云服务请求它。例如 Saaspose (着名的Aspose工具)具有 Word Excel PDF 等。他们在他们的页面上列出了node.js,javascript和Heroku支持。

While there don't seem to be anything you can get with NPM that will do Word directly, you might be able to use a REST API to request it via another cloud service. For example Saaspose (they of the famous Aspose tools) have public API for Word, Excel, PDF, and others. They list node.js, javascript, and Heroku support on their page.

编辑:

我看到Saaspose现在称为 Aspose for Cloud

I see that Saaspose is now called Aspose for Cloud

另一种声称类似的API是 Doxument

Another API that claims something similar is Doxument

这篇关于解析Node.JS中的Microsoft Office文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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