Forum Discussion

owlet0214's avatar
owlet0214
Helper I
6 years ago
Solved

When the file name changes depending on the date

Hello, from Japan   If the file name changes depending on the date, can I fix it by modifying the code?   For example, in the case of today, an expression describing yesterday's date is placed. G...
  • Anonymous's avatar
    Anonymous
    6 years ago

    let

    partDate=DateTime.ToText(Date.AddDays( DateTime.LocalNow(),-1), "yyyy-MM-dd"),

    Origine = Excel.Workbook(Web.Contents("https://www.aaa.com/files/documents/worldwide-"& partDate & ".xlsx"), null, true)

     

    in Origine