0
我有一个存储在SharePoint中的Excel文档集合。这些文件具有相同的格式(它们具有相同的纸张,每张纸具有相同的列)。现在我想从SharePoint文件夹中的每个Excel文件中导入特定工作表。PowerBI - 从SharePoint文件夹中的多个Excel文件导入特定工作表
我创建了一个功能:
let GetExcel = (FileName, FolderPath) =>
let
Source = SharePoint.Files(FolderPath, [ApiVersion = 15]),
TheFile = Source{[Name=FileName,#"Folder Path"=FolderPath]}[Content],
#"Imported Excel" = Excel.Workbook(TheFile),
#"Särskilt boende_Sheet" = #"Imported Excel"{[Item="Särskilt boende",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"Särskilt boende_Sheet")
in
#"Promoted Headers"
in GetExcel
我已经添加自定义列,这样的:
= Table.AddColumn(Source, "Custom", each GetExcel([Name], [Folder Path]))
当我尝试加载的报告中,我得到以下错误:
An error occurred in the ‘GetExcel’ query. DataSource.Error:
Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed:
OData Version: 3 and 4, Error: The remote server returned an error: (404) Not Found. (Not Found)
OData Version: 4, Error: The remote server returned an error: (404) Not Found. (Not Found)
OData Version: 3, Error: The remote server returned an error: (404) Not Found. (Not Found)
Details:
DataSourceKind=SharePoint
DataSourcePath=<Here is a path to our shared folder in SharePoint>
我试图找出我做错了什么,但我无法理解这一点。你有什么想法,我做错了,请帮助:)
亲切的问候,彼得 Rundqvist