如何使用ASP.NET MVC4从HTML页面生成word文档?
问题描述:
我用ASP.net mvc4开发了新的报告。是否可以将HTML字符串导出到asp.net mvc4中的* .doc文件?谢谢!
I have developed new report with ASP.net mvc4. Does it possible to export HTML string to *.doc file in asp.net mvc4? Thank!
答
不,不是。 Word是Office产品。 MVC是一个用于创建HTML的框架。您需要第三方库来创建Word格式的文档。
No, it is not. Word is an Office product. MVC is a framework for creating HTML. You will need a third party library to create documents in Word format.
尝试
http://dotnet-magic.blogspot.in/2010/07/convert-html-to- word-document-using.html [ ^ ]
同样的mvc如下
http://satishratnaparkhi.wordpress.com/2013/ 10/16 / export-to-word-using-mvc-4 / [ ^ ]
一个免费选项是您以RDLC格式创建相同的报告然后将其导出使用代码使用Microsoft Report(RDLC)导出到Word / PDF而不使用报表查看器。 [ ^ ]
One free option is you create the same report in RDLC format and then export it to doc using reporting API in code Exporting to Word/PDF using Microsoft Report (RDLC) without using Report Viewer.[^]