Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用 OpenXML 替换值并保存模板文档。我替换了值,但无法打开模板文档。
我的代码是:
private void SavePart(OpenXmlPart part, string text) { using (StreamWriter sw = new StreamWriter(part.GetStream(FileMode.Create))) { sw.Write(text); } }
我需要打开那个“部分”文档。