C# 如何在Unity和xFF0C中使用NPOI;无效操作异常错误
我想在Unity中导出NPOI的.docx文件。但它给了我一个错误。相同的代码可以在FormsApp中工作,但不能在Unity中工作C# 如何在Unity和xFF0C中使用NPOI;无效操作异常错误,c#,unity3d,npoi,C#,Unity3d,Npoi,我想在Unity中导出NPOI的.docx文件。但它给了我一个错误。相同的代码可以在FormsApp中工作,但不能在Unity中工作 FileStream stream = File.Open(sPath, FileMode.Open, FileAccess.ReadWrite); XWPFDocument doc = new XWPFDocument(stream); stream.Close(); FileStream newStream = new FileStream(tPath, Fi
FileStream stream = File.Open(sPath, FileMode.Open, FileAccess.ReadWrite);
XWPFDocument doc = new XWPFDocument(stream);
stream.Close();
FileStream newStream = new FileStream(tPath, FileMode.Create);
doc.Write(newStream); // ERROR LINE
newStream.Close();
InvalidOperationException:类型NPOI.OpenXmlFormats.ItemChoiceType为
缺少元素“vstream from”的枚举值“vstream”
名称空间
''.
System.Xml.Serialization.XmlReflectionImporter.ImportElementInfo
(System.Type cls,System.String默认名称,System.String
defaultNamespace,System.Type defaultType,
System.Xml.Serialization.XmlTypeMapMemberElement成员,
System.Xml.Serialization.Xml属性(附件)
System.Xml.Serialization.XmlReflectionImporter.CreateMapMember
(系统类型去极化类型,
System.Xml.Serialization.XmlReflectionMember rmember,System.String
默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
defaultNamespace)作为InvalidOperationException重新显示:存在
反映字段“项”时出错。
System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
defaultNamespace)作为InvalidOperationException重新显示:存在
反映类型“NPOI.OpenXmlFormats.CT_属性”时出错。
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
(System.Type类型,System.Xml.Serialization.XmlRootAttribute根,
System.String(默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportElementInfo
(System.Type cls,System.String默认名称,System.String
defaultNamespace,System.Type defaultType,
System.Xml.Serialization.XmlTypeMapMemberElement成员,
System.Xml.Serialization.Xml属性(附件)
System.Xml.Serialization.XmlReflectionImporter.CreateMapMember
(系统类型去极化类型,
System.Xml.Serialization.XmlReflectionMember rmember,System.String
默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
defaultNamespace)作为InvalidOperationException重新显示:存在
反映字段“属性”时出错。
System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
defaultNamespace)作为InvalidOperationException重新显示:存在
反映类型“NPOI.OpenXmlFormats.CT_CustomProperties”时出错。
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
(System.Xml.Serialization.TypeData TypeData,
System.Xml.Serialization.XmlRootAttribute根,System.String
默认名称空间)
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
(System.Type类型,System.Xml.Serialization.XmlRootAttribute根,
System.String(默认名称空间)
System.Xml.Serialization.XmlSerializer..ctor(System.Type类型,
System.Xml.Serialization.XmlAttributeOverrides重写,
System.Type[]外部类型,System.Xml.Serialization.XmlRootAttribute
根,System.String(默认名称空间)
System.Xml.Serialization.XmlSerializer..ctor(System.Type类型)
NPOI.OpenXmlFormats.CustomPropertiesDocument..cctor()返回为
TypeInitializationException:类型引发了异常
NPOI.OpenXmlFormats.CustomPropertiesDocument的初始值设定项
NPOI.POIXMLProperties..cctor()返回为
TypeInitializationException:类型引发了异常
NPOI.POIXMLProperties的初始值设定项
NPOI.POIXMLDocument.GetProperties()作为POIXMLException重新显示
NPOI.POIXMLDocument.GetProperties()NPOI.POIXMLDocument.Write
(System.IO.Stream)UiControl.outford()(在
资产/脚本/UiControl.cs:312)UiControl.Grp1Btn2Click()(位于
资产/脚本/UiControl.cs:288)EventDelegate.Execute()(在
Assets/NGUI/Scripts/Internal/EventDelegate.cs:476)
EventDelegate.Execute(System.Collections.Generic.List`1 List)(位于
Assets/NGUI/Scripts/Internal/EventDelegate.cs:644)UIButton.OnClick()
(位于Assets/NGUI/Scripts/Interaction/UIButton.cs:252)
游戏对象:SendMessage(字符串、对象、SendMessageOptions)
UICamera:Notify(游戏对象、字符串、对象)(在
Assets/NGUI/Scripts/UI/UICamera.cs:1469)
UICamera:ProcessRelease(布尔值,单个)(在
Assets/NGUI/Scripts/UI/UICamera.cs:2325)
UICamera:ProcessTouch(布尔、布尔)(在
Assets/NGUI/Scripts/UI/UICamera.cs:2375)UICamera:ProcessMouse()
Assets/NGUI/Scripts/UI/UICamera.cs:1830)UICamera:processtouchs()
Assets/NGUI/Scripts/UI/UICamera.cs:1943)UICamera:Update()(位于
Assets/NGUI/Scripts/UI/UICamera.cs:1631)