Home

Query Table

%3CLINGO-SUB%20id%3D%22lingo-sub-755226%22%20slang%3D%22en-US%22%3EQuery%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-755226%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F123312iC17343219CCA19C6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3EI%20have%20this%20error%20when%20trying%20to%20create%20a%20query%20table%20by%20getting%20external%20data%20from%20an%20excel%20file%20in%20SharePoint.%20Can%20someone%20tell%20me%20how%20can%20I%20fix%20this%20error%3F%20Or%20can%20someone%20tell%20me%20how%20to%20create%20a%20query%20table%20from%20extenal%20data%20(from%20sharepoint%20excel)%3F%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-755226%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-755298%22%20slang%3D%22en-US%22%3ERe%3A%20Query%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-755298%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F376612%22%20target%3D%22_blank%22%3E%40Sharepoint2019%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20shall%20use%20From%20Sharepoint%20Folder%20connector%2C%20after%20that%20filter%20the%20file%20and%20get%20the%20object%20form%20it.%20As%20variant%20this%20function%20works%3C%2FP%3E%0A%3CPRE%3Elet%0A%20%20%20%20Source%20%3D%20(siteURL%20as%20text%2C%20fileName%20as%20text%2C%20objectName%20as%20text)%20%3D%26gt%3B%0A%0Alet%0A%20%20%20%20Source%20%3D%20SharePoint.Files(siteURL%2C%20%5BApiVersion%20%3D%2015%5D)%2C%0A%20%20%20%20GetFile%20%3D%20Table.SelectRows(Source%2C%20each%20(%5BName%5D%20%3D%20fileName))%2C%0A%20%20%20%20GetContent%20%3D%20Excel.Workbook(GetFile%7B0%7D%5BContent%5D)%2C%0A%20%20%20%20GetObject%20%3D%20Table.SelectRows(GetContent%2C%20each%20(%5BName%5D%20%3D%20objectName))%2C%0A%20%20%20%20GetData%20%3D%20GetObject%7B0%7D%5BData%5D%0Ain%0A%20%20%20%20GetData%0Ain%0A%20%20%20%20Source%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

Capture.PNGI have this error when trying to create a query table by getting external data from an excel file in SharePoint. Can someone tell me how can I fix this error? Or can someone tell me how to create a query table from extenal data (from sharepoint excel)? 

Thank you!

1 Reply

@Deleted 

 

You shall use From Sharepoint Folder connector, after that filter the file and get the object form it. As variant this function works

let
    Source = (siteURL as text, fileName as text, objectName as text) =>

let
    Source = SharePoint.Files(siteURL, [ApiVersion = 15]),
    GetFile = Table.SelectRows(Source, each ([Name] = fileName)),
    GetContent = Excel.Workbook(GetFile{0}[Content]),
    GetObject = Table.SelectRows(GetContent, each ([Name] = objectName)),
    GetData = GetObject{0}[Data]
in
    GetData
in
    Source

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies