Forum Discussion
PowerBI support for OneDrive Personal as data source
- Anonymous9 years ago
Hi Ghislain,
Yes. Please use the following link to connect to excel file located at OneDrive for personal from Power BI Desktop.
https://onedrive.live.com/download?resid=AAXXXX&authkey=AAXXXXXXX&em=x&app=Excel
Replace the bold parts with the resid and authkey that are found by right-clicking on the specific file and selecting “Embed”.
Thanks,
Lydia Zhang
When I follow this procedure in PowerBI Desktop and do Home/NewQuery/Web and place the URL instead of linking to the excel, it calls up excel and opens it in exel.
EMBED CODE from EXCEL:
<iframe src="https://onedrive.live.com/embed?cid=46E7F41E91D28B46&resid=46E7F41E91D28B46%21568&authkey=AGH0iThHc_3Xq9k&em=2" width="402" height="346" frameborder="0" scrolling="no"></iframe>
INSERTED INTO THE PROPOSED TEMPLATE:
The generated m_language code is:
let
Source = Excel.Workbook(Web.Contents("https://onedrive.live.com/download?resid=46E7F41E91D28B46%21568&authkey=AGH0iThHc_3Xq9k&em=2&app=Excel"), null, true),
Q2_2015_Table = Source{[Item="Q2_2015",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Q2_2015_Table,{{"Month", type date}, {"Category", type text}, {"Product", type text}, {"Sales", type number}}),
#"Removed Blank Rows" = Table.SelectRows(#"Changed Type", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))
in
#"Removed Blank Rows"
In your code, make sure Q2_2015 and Q2_2015_Table are substituted with the name of a table you want to access. In case the table is NOT found PowerBI desktop will ask you to select a table.
Note the added step of Removed Blank Rows - apparently when reading excel dara placed on a web drive some blank rows might be added. So this step gets rid of those.
Code was competed and tested with http://www.myonlinetraininghub.com/ which taught me what I know.
Mickey