Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AAJahfali
New Member

combining excel files from share point

I could not combine files in power query for excel files available in SharePoint, which were exported by the Microsoft project. Even if I tried to open them by an individual without combining them then, this message would appear to me 

 

DataSource.Error: Web.Contents failed to get contents from 'https://seccomsa.sharepoint.com/sites/WesternRegionTIReport-M.SProjectUsers/_api/web/getfilebyserverrelativeurl('/sites/WesternRegionTIReport-M.SProjectUsers/Shared%20Documents/M.S%20Project%20Users/M.S%20Project%20Updates%20(Excel%20Type%20Only)/SPP%20ST#11.xlsx')/$value' (400): Bad Request
Details:
    DataSourceKind=SharePoint
    DataSourcePath=https://seccomsa.sharepoint.com/sites/WesternRegionTIReport-M.SProjectUsers
    Url=https://seccomsa.sharepoint.com/sites/WesternRegionTIReport-M.SProjectUsers/_api/web/getfilebyserverrelativeurl('/sites/WesternRegionTIReport-M.SProjectUsers/Shared%20Documents/M.S%20Project%20Users/M.S%20Project%20Updates%20(Excel%20Type%20Only)/SPP%20ST#11.xlsx')/$value

 

also, when I tried to combine the same files from the local folder, then it will be done smoothly without any problem

 

if I replaced the excel files in SharePoint with other excel files that be generated by any other thing else then the power query will combine it without any problem 

sample files  put them in SharePoint then try to combine them by power query

 

So what is the problem and what can I do in this situation?

1 ACCEPTED SOLUTION
AAJahfali
New Member

The Problem Solved 🎉

 

solved.png

 

in the first, the files' names contained "#" 

so I deleted the "#" sign then the power query accepted to combine the files together

I feel I wanna cry

View solution in original post

3 REPLIES 3
AAJahfali
New Member

The Problem Solved 🎉

 

solved.png

 

in the first, the files' names contained "#" 

so I deleted the "#" sign then the power query accepted to combine the files together

I feel I wanna cry

jbwtp
Memorable Member
Memorable Member

Hi @AAJahfali,

 

This is quite interesting.

Why are you opening them as Web.Content (Web connector). Why not using Sharepoint Folder connector? I think this is why they fail to open. Do you mind also sharing your code (at least the first couple of lines where you call the connector to fetch the data)? Maybe remove the address part for security.

 

Cheers,

John

I am using SharePoint Folder 

now I tried to export from the project manager a different type "CVS" and connect it to the power query by SharePoint Folder service and still getting the same problem when I click combine the process it will not appear and when I try to open it individually then this message will come to me 

DataFormat.Error: The input URL is invalid. Please provide a URL to the file path on SharePoint up to the file name only (with no query or fragment part).
Details:
    https://seccomsa.sharepoint.com/sites/WesternRegionTIReport-M.SProjectUsers/Shared Documents/M.S Project Users/New folder/Unit#11 Annual Inspection Updated.csv

 

let
    Source = SharePoint.Files("https://seccomsa.sharepoint.com/sites/WesternRegionTIReport-M.SProjectUsers/", [ApiVersion = 15]),
    #"Filtered Rows" = Table.SelectRows(Source, each [Extension] = ".csv"),
    next = #"Filtered Rows"{[Name="Unit#11 Annual Inspection Updated.csv",#"Folder Path"="https://seccomsa.sharepoint.com/sites/WesternRegionTIReport-M.SProjectUsers/Shared Documents/M.S Project Users/New folder/"]}[Content]
in
    next

 

This is the Code 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors