c#用Aspose将word文件转为html

 

sring reportPath="";//自行填写需要转化的文件路径

Aspose.Words.Document doc = new Aspose.Words.Document(reportPath);
Aspose.Words.Saving.HtmlSaveOptions options = new Aspose.Words.Saving.HtmlSaveOptions();
options.ExportRoundtripInformation = true;


string htmlRptPath = pathProvider.MapPath("/Document/Html/质量监督情况报告"+ "/");
//创建存html的文件夹
if (!System.IO.Directory.Exists(htmlRptPath))
{

System.IO.Directory.CreateDirectory(htmlRptPath);
}
doc.Save(htmlRptPath + obj.SuperviseName + ".html", options);

上一篇:review一个javascript功能函数


下一篇:Aspose.CAD库简介