New Member
December 16, 2021
I am trying to combine different excel files which have different tab name. since every tab has some unwant rows, i would like to remove top X rows before combine them.
so I am doing the preparation work but I found a error. may I ask what is the problem seems like? i tried this code with other file, and it works for other files...
error message:
Unexpected error: Value cannot be null.
Parameter name: key
Details:
Microsoft.Mashup.Evaluator.Interface.ErrorException: Value cannot be null.
Parameter name: key ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key
error message:
this is the code so far i have and face th error
let
Source = Folder.Files("path"),
#"Replaced Value" = Table.ReplaceValue(Source,".xlsx","",Replacer.ReplaceText,{"Name"}),
#"Removed Other Columns" = Table.SelectColumns(#"Replaced Value",{"Content", "Name"}),
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "getexcelsheet", each Excel.Workbook([Content],true)),
#"Expanded getexcelsheet" = Table.ExpandTableColumn(#"Added Custom", "getexcelsheet", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name.1", "Data", "Item", "Kind", "Hidden"})
in
#"Expanded getexcelsheet"
New Member
December 16, 2021
sorry to answer myself here looks like crazy. however, I have found the problem and fixed it and would like to share someone might have same issue like me here...
the problem seems causing on some name defined on sourced excel files. the problem is fixed, once i deleted all defined name on file.
however, I also fixed it by removing TRUE in below code, it also works now.
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "getexcelsheet", each Excel.Workbook([Content],true)),
1 Guest(s)