Forum Discussion
Get Data from SharePoint Folder with Today's Date
- 4 years ago
Hİ ,all I solved The problem.
I changed some M Language in advanced Editor like this
let Source = SharePoint.Files("https://unilever.sharepoint.com/sites/DaliyDisputeReport/", [ApiVersion = 15]), #"Daily-Dispute-Report_14 06 2022 xls_https://brbsapp266 sharepoint com/sites/DaliyDisputeReport/Shared Documents/General/" = Source{[Name="Daily-Dispute-Report_"&Date.ToText(Date.AddDays(DateTime.Date(DateTime.LocalNow()),-1),"dd.MM.yyyy")&".xls",#"Folder Path"="https://brbsapp266.sharepoint.com/sites/DaliyDisputeReport/Shared Documents/General/"]}[Content], #"Imported Excel Workbook" = Excel.Workbook(#"Daily-Dispute-Report_14 06 2022 xls_https://brbsapp266 sharepoint com/sites/DaliyDisputeReport/Shared Documents/General/"), #"Crm List_Sheet" = #"Imported Excel Workbook"{[Item="Crm List",Kind="Sheet"]}[Data], #"Promoted Headers" = Table.PromoteHeaders(#"Crm List_Sheet", [PromoteAllScalars=true]) inThank you
- 4 years ago
Hi sinanalmac ,
Connect to your SharePoint folder using the SharePoint Folder connector.
When the files list comes up in the connection dialog, hit the Transform button. This should give you a list of all files available from that folder, something like this:
Filter this table as you would a normal table, using a combination of filters on [Name], [Date modified], and [Date created] to create a generic set of filters that will always select 'today's' file from your folder.
For example, your filter arguments may look something like this:
Table.SelectRows( previousStepName, each Text.StartsWith([Name], "DailyDispute") and [Date created] = Date.From(DateTime.LocalNow()) )Once you've narrowed your table down to the one report for today, click the yellow "Binary" word in the [Content] column to open up that file in your query.
Pete
Hi sinanalmac ,
Connect to your SharePoint folder using the SharePoint Folder connector.
When the files list comes up in the connection dialog, hit the Transform button. This should give you a list of all files available from that folder, something like this:
Filter this table as you would a normal table, using a combination of filters on [Name], [Date modified], and [Date created] to create a generic set of filters that will always select 'today's' file from your folder.
For example, your filter arguments may look something like this:
Table.SelectRows(
previousStepName,
each Text.StartsWith([Name], "DailyDispute")
and [Date created] = Date.From(DateTime.LocalNow())
)
Once you've narrowed your table down to the one report for today, click the yellow "Binary" word in the [Content] column to open up that file in your query.
Pete
Hi BA_Pete ,
Thank you for your help. You're right. your solution is more logical then mine. I will Accept your reply as solution as well.
best regrads