Forum Discussion
Connecting to data source hosted on Dropbox
This is not true!!!!
I have successful connected my desktop model to an anonnymous dropbox link and it refreshes absolutely fine on PBI servce. OneDrive is an absolute disaster as a cloud storage system, it works for Power bI but is garbagge for anything else.
The issue I have is where my query is doing a folder query so I need ot try Imke solution
For example I have this file Inputs.xlsx which sits in Dropbox\DataModels\SourceFiles.
firstly create a blank query to set the path to the file
DropboxSourcePath is
let
Source = "https://api-content.dropbox.com/1/files/auto/DataModel/SourceFiles/"
in
Source
Secondly go onto dropbox online and into developer section as Imke described ot create an app and get a token. In my case I have tried her folder app so I just got a token for the whole of dropbox.
Token is
let
Source = "?access_token=lkPfa4vOd-AAAAAAAAAAKjmGh93HWPeYFfffdfffdfdggf-CY0LSTVss5JF53HOGK46xxkWsQzhj-"
in
Source
Then your query becomes. Note now web.contents instead of file.contents and if you have any path its "/" not "\"
let
Source = Excel.Workbook(Web.Contents(DropboxSourcePath & "Inputs.xlsx" & Token), null, true),
Seasonality_Table = Source{[Item="Seasonality",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Seasonality_Table,{{"Month No", Int64.Type}, {"Month", type text}, {"Car Count Seasonality", type number}, {"GTV Seasonality", type number}})
in
#"Changed Type"
So I can refresh all conenctions on desktop and when I publish to PBI Service I see under credential web for each of these dropbox links. Edit conenction and chose annonymous.
Mike
I know what the catch is now. The devil is in the details.
At first I didn't at all know that there was a way to get any other access token string than to create an app and generate it from there. But when I saw your post and the bit with "In my case I have tried her folder app so I just got a token for the whole of dropbox.", I realized there had to be another way and was a bit irritated that the solution to this haven't been emphazised in any of the threads about this topic. Just as if it was obvious or something =).
Once in dropbox.com/developers, go to API Explorer. For the action we are trying to do here is the list_folder command, so click on that from the margin. Then you can generate an access token for the whole of dropbox. You can even pick personal or organizational account when generating. In this case you don't need to have a function and so on. Just do the Web query, insert the url string as detailed in the previous responses and you'll then be able to pick the excel sheets as tables.
It worked just fine when publishing as well, just like masplin said. (Y)