Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Refreshing data through Onedrive

Hi All,  This is the first time i am doing this in PowerBI.   I have created a PBIX which has some reports. The data source used is an excel file on my local system. Now this data will be update...
  • danielhunter's avatar
    danielhunter
    8 years ago

    Local Excel

     

    Source = Excel.Workbook(File.Contents("C:\Users\xxxxxxxxxxxxxxxxxxxxxx\Device-Order-Data-CDN.xlsx"), null, true),

     

    Onedrive

     

    Source = Excel.Workbook(Web.Contents("https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Documents/Device-Order-Data-CDN.xlsx"), null, true),

     

  • Anonymous's avatar
    Anonymous
    8 years ago

     Dear   danielhunter i have been able to resolve this... for some wiered reason the problem was with the Link i was getting from the file... It was completely different than what you showed me.
    Today again i gave it a try to change the source from excel file on my local machine to Excel on One Drive. 
    I uploaded the file on OneDrive opened them in Excel ( not excel Online) the difference i noticed this time before i could copy the link was that it gave a message that the file is opened in "Offiline Mode" .
    Then copied the link from the file. In PBI went to "Data source settings" and changed the link (removed web=1) from the end saved and published on Service.


    I also tested it...

    Method was :

     

    Deleted the file from Onedrive.
    I had the original file on my Laptop. ( Name of the file is same)
    Deleted some rows from the file and saved it.
    Uploaded this file on Ondrive.
    Refreshed data manually after 5 mins.
    Data and visuals are updated with change.


    Root of the issue was link and i dont know why :D .