forked from eduardoveloso/PowerBiContent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
google-drive-function.txt
25 lines (21 loc) · 993 Bytes
/
google-drive-function.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//functions to read sheets from google drive
let Docs=
(#"GOOGLE SHEET URL" as text)=>
let
new_url = Text.Replace(#"GOOGLE SHEET URL", "edit?usp=sharing", "export?format=xlsx"),
Source = Excel.Workbook(Web.Contents(new_url), null, true)
in
Source,
documentation = [
Documentation.Name = " Get Excel files from Google Docs
", Documentation.Description = " Get Excel files from Google Docs
" , Documentation.LongDescription = " Go to File> Share. From the link generated, copy the random numbers between /d/ and /edit?usp=sharing and paste them in the key text field below. Click Invoke.
", Documentation.Category = " Accessing data functions
", Documentation.Source = " local
", Documentation.Author = " Ruth Pozuelo Martinez. www.curbal.com
", Documentation.Examples = {[Description = "
" , Code = " https://www.youtube.com/watch?v=2hFCeduIP6k
", Result = "
"]}]
in
Value.ReplaceType(Docs, Value.ReplaceMetadata(Value.Type(Docs), documentation))