找回密码
 立即注册

QQ登录

只需一步,快速开始

[已处理] 导出EXCEL失败

phoben 讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-8 21:04  /   查看:3894  /  回复:11


不管表格有没有数据,导出都会失败

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

11 个回复

倒序浏览
Chelsey.Wang讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-9 09:48:43
沙发
您好,您是在使用导出表格到EXCEL命令时遇到了问题吗?具体是什么样的场景和问题呢,建议您上传一个可以复现问题的demo,我这边尝试用您工程复现一下~
回复 使用道具 举报
phoben讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-13 22:14:52
板凳
Chelsey.Wang 发表于 2022-2-9 09:48
您好,您是在使用导出表格到EXCEL命令时遇到了问题吗?具体是什么样的场景和问题呢,建议您上传一个可以复 ...

就是普通的一个表格,放一个导出命令,回头我做个新工程试试
回复 使用道具 举报
Chelsey.Wang讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-14 12:13:55
地板
phoben 发表于 2022-2-13 22:14
就是普通的一个表格,放一个导出命令,回头我做个新工程试试

好的呢,我这边用普通表格+导出命令是没有复现这个现象的,等大佬一个demo
回复 使用道具 举报
鲁磊
高级会员   /  发表于:2022-2-14 21:38:49
5#
我也遇到过,应该是某个第三方插件的原因,我当时是下拉多选那个插件的原因
回复 使用道具 举报
David.Zhong讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-15 09:28:11
6#
鲁磊 发表于 2022-2-14 21:38
我也遇到过,应该是某个第三方插件的原因,我当时是下拉多选那个插件的原因

感谢大佬分享的宝贵经验~
回复 使用道具 举报
phoben讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-15 10:08:04
7#
Chelsey.Wang 发表于 2022-2-14 12:13
好的呢,我这边用普通表格+导出命令是没有复现这个现象的,等大佬一个demo

新建空白应用无法复现,目前提示报错如下:

在执行导出操作时,未知的异常出现。请再次尝试。
{
  "ClassName": "System.AggregateException",
  "Message": "One or more errors occurred.",
  "Data": null,
  "InnerException": {
    "$type": "Newtonsoft.Json.JsonSerializationException, Newtonsoft.Json",
    "ClassName": "Newtonsoft.Json.JsonSerializationException",
    "Message": "Error resolving type specified in JSON 'Forguncy.CustomMenu.ForguncyMenuCellType, Forguncy.CustomMenu'. Path 'AttachInfos.9,34.CellType.$type', line 631, position 80.",
    "Data": null,
    "InnerException": {
      "$type": "Newtonsoft.Json.JsonSerializationException, Newtonsoft.Json",
      "ClassName": "Newtonsoft.Json.JsonSerializationException",
      "Message": "Could not find type 'Forguncy.CustomMenu.ForguncyMenuCellType' in assembly 'Forguncy.CustomMenu, Version=1.0.1.1, Culture=neutral, PublicKeyToken=null'.",
      "Data": null,
      "InnerException": null,
      "HelpURL": null,
      "StackTraceString": "   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(StructMultiKey`2 typeNameKey)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Newtonsoft.Json.Utilities.ThreadSafeStore`2.Get(TKey key)
   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeByName(StructMultiKey`2 typeNameKey)
   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)",
      "RemoteStackTraceString": null,
      "RemoteStackIndex": 0,
      "ExceptionMethod": null,
      "HResult": -2146233088,
      "Source": "Newtonsoft.Json",
      "WatsonBuckets": null
    },
    "HelpURL": null,
    "StackTraceString": "   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Forguncy.Server2.Controllers.Export.an.f[a](String A_0)",
    "RemoteStackTraceString": null,
    "RemoteStackIndex": 0,
    "ExceptionMethod": null,
    "HResult": -2146233088,
    "Source": "Newtonsoft.Json",
    "WatsonBuckets": null
  },
  "HelpURL": null,
  "StackTraceString": "   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Forguncy.Server2.Controllers.Export.an..ctor(String A_0, String A_1)
   at Forguncy.Server2.Controllers.a.d(String A_0)
   at Forguncy.Server2.Controllers.a.n()
   at Forguncy.Server2.Controllers.a.a(String A_0, List`1 A_1)
   at Forguncy.Server2.Controllers.HomeController.a(Object A_0)",
  "RemoteStackTraceString": null,
  "RemoteStackIndex": 0,
  "ExceptionMethod": null,
  "HResult": -2146233088,
  "Source": "System.Private.CoreLib",
  "WatsonBuckets": null,
  "InnerExceptions": {
    "$type": "System.Exception[], System.Private.CoreLib",
    "$values": [
      {
        "$type": "Newtonsoft.Json.JsonSerializationException, Newtonsoft.Json",
        "ClassName": "Newtonsoft.Json.JsonSerializationException",
        "Message": "Error resolving type specified in JSON 'Forguncy.CustomMenu.ForguncyMenuCellType, Forguncy.CustomMenu'. Path 'AttachInfos.9,34.CellType.$type', line 631, position 80.",
        "Data": null,
        "InnerException": {
          "$type": "Newtonsoft.Json.JsonSerializationException, Newtonsoft.Json",
          "ClassName": "Newtonsoft.Json.JsonSerializationException",
          "Message": "Could not find type 'Forguncy.CustomMenu.ForguncyMenuCellType' in assembly 'Forguncy.CustomMenu, Version=1.0.1.1, Culture=neutral, PublicKeyToken=null'.",
          "Data": null,
          "InnerException": null,
          "HelpURL": null,
          "StackTraceString": "   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(StructMultiKey`2 typeNameKey)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Newtonsoft.Json.Utilities.ThreadSafeStore`2.Get(TKey key)
   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeByName(StructMultiKey`2 typeNameKey)
   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)",
          "RemoteStackTraceString": null,
          "RemoteStackIndex": 0,
          "ExceptionMethod": null,
          "HResult": -2146233088,
          "Source": "Newtonsoft.Json",
          "WatsonBuckets": null
        },
        "HelpURL": null,
        "StackTraceString": "   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Forguncy.Server2.Controllers.Export.an.f[a](String A_0)",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": null,
        "HResult": -2146233088,
        "Source": "Newtonsoft.Json",
        "WatsonBuckets": null
      }
    ]
  }
}

CurrentMethodName: ExportToExcelThread
回复 使用道具 举报
David.Zhong讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-15 11:18:46
8#
看起来像是菜单插件引起的,可以考虑重装一下这个插件~

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
phoben讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-15 21:56:03
9#
David.Zhong 发表于 2022-2-15 11:18
看起来像是菜单插件引起的,可以考虑重装一下这个插件~

还确实,电脑上版本太多了,经常出现插件版本过低问题
回复 使用道具 举报
David.Zhong讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-2-16 09:12:42
10#
phoben 发表于 2022-2-15 21:56
还确实,电脑上版本太多了,经常出现插件版本过低问题

回复 使用道具 举报
12下一页
您需要登录后才可以回帖 登录 | 立即注册
返回顶部