开发者

Difference between Open and Create on DocumentFormat.OpenXml.Packaging.WordprocessingDocument

The docs for both methods read virtually identical to me. I have a template (.DOTX) which I want to open and make changes to, saving as .DOCX. What's the right approach? And, in fact, how do I save开发者_如何学JAVA the document? I see no Save method...


Using the Open method requires that the document already exists. If not, an exception is thrown.

Using the Create method will open the document if it exists or create it if it doesn't.

When you call the Close method, the document is saved automatically.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜