开发者

OpenXML SDK: Updated text in HeaderPart not getting saved

elem is obtained by searching various document parts, both MainDocumentPart.Document and HeaderParts:

                Text text =开发者_开发技巧 elem.GetFirstChild<Text>();
                System.Console.Write("Updating content from '{0}'", text.Text);
                text.Text = "blah";
                System.Console.WriteLine(" to '{0}'", text.Text);

In all cases the output is exactly as expected to stdout, it looks to work perfectly. But when the file is saved, only changes to the main body text are seen... the header remains unchanged. Do I have to unlock the header or something?


Call HeaderPart.Header.Save() on the Header that contains elem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜