如何在sql数据库中保存自动文本对象,并将其用openxml sdk 2.5
与c#一起写回一个单词模板。
这是我试图为图像做的事情:
foreach (DocumentBinaryPart relatedDocumentPart in AutotextContainer.RelatedDocumentParts.Where(x => x.Type == "ImagePart"))
{
ImagePart imagePart = mainDocumentPart.GlossaryDocumentPart.AddImagePart(relatedDocumentPart.ImageType, relatedDocumentPart.relationshipid);
using (Stream stream = new MemoryStream(relatedDocumentPart.Data))
imagePart.FeedData(stream);
mainDocumentPart.GlossaryDocumentPart.AddPart<ImagePart>(imagePart, relatedDocumentPart.relationshipid);
}
我尝试在此相关文档部分中保存自动文本以将其保存在数据库中...