Unity中的NPOI:docPropsVTypes中缺少枚举值,但它在常规C#程序中工作
我已经使用VS2015(带有.NET 2.0选项)构建了最新的NPOI代码(),我可以运行VS2015中构建的C#程序来创建和操作Excel工作簿。我想让Unity C#脚本使用NPOI库,但是当我尝试创建一个具有以下行的工作簿时Unity中的NPOI:docPropsVTypes中缺少枚举值,但它在常规C#程序中工作,c#,.net,xml,unity3d,npoi,C#,.net,Xml,Unity3d,Npoi,我已经使用VS2015(带有.NET 2.0选项)构建了最新的NPOI代码(),我可以运行VS2015中构建的C#程序来创建和操作Excel工作簿。我想让Unity C#脚本使用NPOI库,但是当我尝试创建一个具有以下行的工作簿时 IWorkbook workbook = new XSSFWorkbook(); 我得到了一个InvalidoOperationException,详细信息见本文末尾。我不熟悉NPOI代码,所以我真的不确定这里会发生什么。是什么导致了这个错误 这里的错误,我已经加粗
IWorkbook workbook = new XSSFWorkbook();
我得到了一个InvalidoOperationException,详细信息见本文末尾。我不熟悉NPOI代码,所以我真的不确定这里会发生什么。是什么导致了这个错误
这里的错误,我已经加粗的部分例外,但留在堆栈信息只是为了以防万一,这是重要的。对不起,这太过分了
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
默认名称空间)
作为InvalidOperationException重新显示:反映字段“Item”的错误。
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
默认名称空间)
作为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
默认名称空间)
作为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
默认名称空间)
作为InvalidOperationException重新显示:反映类型“NPOI.OpenXmlFormats.CT\u 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.XSSF.UserModel.XSSFWorkbook.OnWorkbookCreate()
NPOI.XSSF.UserModel.XSSFWorkbook..ctor()TestExcel.Start()(位于
资产/TestExcel.cs:10)
我很好奇-为什么你想在unity中阅读Office文件??听起来很酷…使用TSPI文件(通常为Excel格式)设置对象动画。说来话长。