- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Question: Does "read N files from Sharepoint-folder" work for N=1?
Hello there,
I want to load one file only(!) using the Read-(and combine)-Multiple-Files-From-Sharepoint-Folder"-Functionality.
It seems that tis does not work for N=1, only for N>1.
Can you please comment on this?
Reason why I am asking:
on an unregularily base I receive 1 CSV-File that needs to be integrated into reporting.
Unfortunately the file name contains a date, which needs to be handled with a workaround before loading to SP-Folder.
I would like to get rid of this workaround and tried the Read-Multiple-Approach.
Do you have any idea(s)?
thx in advance
Thomas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @thomasreick ,
The "Read Multiple Files from SharePoint Folder" functionality is designed to read multiple files from a folder, and it may not work for a single file. However, you can still use the SharePoint connector to read a single file from a folder. Here is an example of how to read a single file from a SharePoint folder using the SharePoint connector:
let
Source = SharePoint.Files("https://yoursharepointsite.sharepoint.com/sites/yourfolder/"),
#"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "yourfile.csv")),
#"Content" = #"Filtered Rows"{0}[Content]
in
#"Content"
Replace "https://yoursharepointsite.sharepoint.com/sites/yourfolder/" with the URL of your SharePoint site and folder, and replace "yourfile.csv" with the name of your file. This code will read the content of the file into a table.
Hope it helps.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @thomasreick ,
The "Read Multiple Files from SharePoint Folder" functionality is designed to read multiple files from a folder, and it may not work for a single file. However, you can still use the SharePoint connector to read a single file from a folder. Here is an example of how to read a single file from a SharePoint folder using the SharePoint connector:
let
Source = SharePoint.Files("https://yoursharepointsite.sharepoint.com/sites/yourfolder/"),
#"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "yourfile.csv")),
#"Content" = #"Filtered Rows"{0}[Content]
in
#"Content"
Replace "https://yoursharepointsite.sharepoint.com/sites/yourfolder/" with the URL of your SharePoint site and folder, and replace "yourfile.csv" with the name of your file. This code will read the content of the file into a table.
Hope it helps.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could parse the date out of the filename to create a date column and then you can either sort by that or use the Table.Max function to keep only the latest file. You don't have to use the Combine & Transform functionality on this one.
Pat
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
07-11-2024 01:34 AM | |||
Anonymous
| 10-14-2019 11:21 PM | ||
06-07-2024 12:35 AM | |||
06-03-2024 07:14 AM | |||
08-13-2024 08:33 AM |