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);

posted @ 2021-11-04 15:52  不等式夹逼法  阅读(756)  评论(0编辑  收藏  举报