Forum Discussion
"Unexpected error" when reading sharepoint folder full of large text files using Dataflows
Hope this helps: I have faced the same issue many times.
Now i prefer to use SharePoint.Contents instead of SharePoint.Files which is both easier to reach the files i want ie (their folder) and seems to work well.
This unexpected error has started in may or June i believe and no one seems to have acknoledged it.
I would love an extension to the API allowing to directly access a given folder.
Hi jmdh , thank you for your suggestion.
Unfortunately, it didn't workout for me. I can summarize the steps for both methods as followed:
Using SharePoint.Files
1. Source = SharePoint.Files("https://xxxxx.sharepoint.com/sites/xxxxx", [ApiVersion = 15])
2. #"Keep Content" = Table.SelectColumns(Source ,{"Content"})
Using SharePoint.Contents
1. Source = SharePoint.Contents("https://xxxxx.sharepoint.com/sites/xxxxx", [ApiVersion = 15])
2. #"Shared Documents" = Source{[Name="Shared Documents"]}[Content]
3. Data = #"Shared Documents"{[Name="Data"]}[Content]
4. #"Keep Content" = Table.SelectColumns(Data ,{"Content"})
With both approaches I come to the same next step: combine files (expand the content), selecting the two down arrows next to the field name Content.
That's the point where I get this unexpected error, no matter which of the previous functions I use.
- jmdh6 years ago
Advocate IV
May sound dumb but does it work on PowerBI Desktop ?
- fabo6 years ago
Advocate III
Yes, it does work on PowerBI Desktop. No problem there.
I was trying to replicate the same over dataflows.
- jmdh6 years ago
Advocate IV
I will look further tonight : however the same code does not yield the same results in Desktop and Dataflow.
In short: Desktop creates a Content column which contains the Binary of each excel file, while Dataflow creates a Content column which contains a Table value for each file...