Aspose.Words.Document wordDoc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(wordDoc);
stirng html="<html></html>";//这是html文本
builder.InsertHtml(html);
wordDoc.Save("D:\\test.doc", Aspose.Words.Saving.SaveOptions.CreateSaveOptions(SaveFormat.Doc));
本文介绍如何利用Aspose.Words库将HTML文本转换为Word文档。通过创建Aspose.Words.Document实例和DocumentBuilder,可以插入HTML内容并保存为Word格式。此过程适用于需要将网页内容导出到Word文件的应用场景。


被折叠的 条评论
为什么被折叠?



