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);
标签:word,htmlRptPath,c#,html,Words,Aspose,Document,options 来源: https://www.cnblogs.com/fkxx/p/15508510.html