Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to make sharepoint folder auto load new CSV file ?

Hi All 

I have create folder at sharepoint with 2 CSV file :-

I am able to load these 2 CSV file to PBI.

 

But when i add one more CSV file to sharepoint folder.  But the PBI will not automatic to load these 3 file to PBI. it still only load the 2 file to PBI. when i press refresh icon.

 

Any work around ?

 

Paul Yeo  

 

  • Hi Anonymous 

    After the Source step, you need to filter the files by extension to only include CSV files.

    Then a refresh will pick up any and all CSV files on Sharepoint.

    The M code will look like this but you only need to use the GUI

     

    Source = SharePoint.Files("https://365moth.sharepoint.com/sites/PGTWork", [ApiVersion = 15]),
        #"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".csv"))

     

    Phil

4 Replies

  • Hi Anonymous 

    After the Source step, you need to filter the files by extension to only include CSV files.

    Then a refresh will pick up any and all CSV files on Sharepoint.

    The M code will look like this but you only need to use the GUI

     

    Source = SharePoint.Files("https://365moth.sharepoint.com/sites/PGTWork", [ApiVersion = 15]),
        #"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".csv"))

     

    Phil

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Phil

      Thank you very much for your help , i have follow your instruction by filter only load CSV file . But then due to my sharepoint have many CSV file , so i only select Book1.CSV till Book4.CSV file to load. otherwise it will load all CSV file , which is not what i need. and after sucessfully load all CSV 4 file to PBI , and when i add one more CSV file = Book5.CSV , it will not load the latest CSV file which is Book5.CSV. Any work around ?

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Phil

      Thank you very much for sharing , i just found a new way , that is i create a special folder just for load GL data. it work fine