本文介绍了一般输入/输出错误问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

常规输入/输出错误问题帮助我



我使用Open XML生成docx文件



当我在Oppenoffice中打开文件时,org Writer



抛出常规输入/输出错误



我的代码



General Input/Output Error Problem help me

Im generating docx file using Open XML

When i open the file in Oppenoffice,org Writer

its throw General Input/Output Error

My code

public void WordprocessingFromString(string InputPath, string OutputPath, string InputDir)
        {          
            using (WordprocessingDocument myDoc = WordprocessingDocument.Create(OutputPath, WordprocessingDocumentType.Document))
            {
                MainDocumentPart mainPart = myDoc.AddMainDocumentPart();                mainPart.Document = new Document();
                Body body = new Body();
                Text heading_text = new Text("Test by amal..");
                ParagraphProperties heading_pPr = new ParagraphProperties();
                body.Append(heading_text);
                mainPart.Document.Append(body);
                mainPart.Document.Save();
            }
        }





提前致谢



Thanks in advance

推荐答案

这篇关于一般输入/输出错误问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 03:47