ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 338|回复: 1

[求助] power bi合并文件出错

[复制链接]

TA的精华主题

TA的得分主题

发表于 2023-2-24 12:15 | 显示全部楼层 |阅读模式
各位大神好:


   通过power query 和 power bi 合并文件时,提示以下截图错误,这个是什么问题啊?怎么解决?
   注:是导入第二个文件夹时出错的,通过自定义列输入公式:=Excel.Workbook([Content],true)时提示错误。
image.jpg
步骤M语言:
let
    源 = Folder.Files("E:\0001财务工作\1004南昌绿高\2004财务\3002收入"),
    删除的列 = Table.RemoveColumns(源,{"Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}),
    筛选的行 = Table.SelectRows(删除的列, each ([Name] = "湖北区域绿高-台账2021年.xlsx" or [Name] = "湖北区域绿高-台账2022年.xlsx" or [Name] = "湖北区域绿高-台账2023年.xlsx")),
    已添加自定义 = Table.AddColumn(筛选的行, "自定义", each Excel.Workbook([Content],true)),
    #"展开的“自定义”" = Table.ExpandTableColumn(已添加自定义, "自定义", {"Data"}, {"Data"})
in
    #"展开的“自定义”"


错误全部内容:


意外错误: 值不能为 null。
参数名: key
详细信息:
    Microsoft.Mashup.Evaluator.Interface.ErrorException: 值不能为 null。
参数名: key ---> System.ArgumentNullException: 值不能为 null。
参数名: key ---> System.ArgumentNullException: 值不能为 null。
参数名: key
   在 System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   在 System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   在 Microsoft.Mashup.Engine1.Runtime.Keys.DictionaryStringKeys..ctor(String[] keys)
   在 Microsoft.Mashup.Engine1.Runtime.Keys.New(String[] keys)
   在 Microsoft.Mashup.Engine1.Library.Excel.ExcelReaderOpenXml.CreateTableValue(ExcelWorksheet sheet, String dimension, Boolean useFirstRowAsHeader)
   在 Microsoft.Mashup.Engine1.Library.Excel.ExcelReaderOpenXml.WorksheetTableValueReference.get_Value()
   在 Microsoft.Mashup.Engine1.Runtime.RecordValue.ReferenceArrayRecordValue.get_Item(Int32 index)
   在 Microsoft.Mashup.Engine1.Runtime.RecordValue.TryGetValue(String key, Value& value)
   在 Microsoft.Mashup.Engine1.Runtime.OptionalFieldAccessValueReference.GetValue()
   在 Microsoft.Mashup.Engine1.Runtime.FieldAccessValueReference.get_Value()
   在 Microsoft.Mashup.Engine1.Runtime.RecordValue.ReferenceArrayRecordValue.get_Item(Int32 index)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.<>c__DisplayClass109_0.<WritePreviewFieldValue>b__0()
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.HandleErrors(Action action, Action`1 handler)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.<>c__DisplayClass100_2.<WritePreviewTable>b__2()
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.HandleErrors(Action action, Action`1 handler)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.<>c__DisplayClass100_1.<WritePreviewTable>b__1()
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.HandleErrors(Action action, Action`1 handler)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.HandleErrors(Action action, Action`1 handler)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.WritePreviewTable(IValue value)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.HandleErrors(Action action, Action`1 handler)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.WritePreviewValue(IValue value, Int32 serializeStructuredValueDepth)
   在 Microsoft.Mashup.Evaluator.Services.ValueSerializer.SerializePreviewValue(IEngine engine, IValue value, Action`2 rowCountCallback, Nullable`1 options)
   在 Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.SerializeRows(Int32 count)
   在 Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.get_SmallValue()
   在 Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
   在 Microsoft.Mashup.Evaluator.RemotePreviewValueSource.<>c__DisplayClass0_0.<RunStub>b__0()
   在 Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
   --- 内部异常堆栈跟踪的结尾 ---
   在 Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass11_0.<TryReportException>b__1()
   在 Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action)
   在 Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)
   在 Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
   在 Microsoft.Mashup.Evaluator.RemotePreviewValueSource.RunStub(IEngineHost engineHost, IMessageChannel channel, Func`1 getPreviewValueSource)
   在 Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass12_1`1.<OnBeginGetResult>b__0()
   在 Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
   在 Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
   在 Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.EvaluationHost.Run()
   在 Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
   在 Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
   在 Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
   在 Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)
   --- 内部异常堆栈跟踪的结尾 ---
   在 Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
   在 Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
   在 Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
   在 Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue()
   在 Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
   在 Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

TA的精华主题

TA的得分主题

发表于 2023-3-9 22:08 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
建议数据脱敏后  上传附件
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-5-21 00:27 , Processed in 0.040614 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表