-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathget-TableOfLanguages.pq
42 lines (42 loc) · 1.51 KB
/
get-TableOfLanguages.pq
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
let
output =
() as table =>
let
web = Web.Contents("https://docs.microsoft.com/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a"),
getTable =
Html.Table(
web,
{
{
"Language Code",
"TABLE > TBODY > TR > :nth-child(1)"
},
{
"Description (informative)",
"TABLE > TBODY > TR > :nth-child(2)"
},
{
"BCP 47 Code",
"TABLE > TBODY > TR > :nth-child(3)"
}
},
[RowSelector = "TABLE > TBODY > TR"]
),
out = Table.RemoveLastN(getTable, 1)
in
out,
documentation = [
Documentation.Name = " get-TableOfLanguages.pq ",
Documentation.Description = " Get a table with all defined languages and their short codes. ",
Documentation.Source = "https://www.jaknapowerbi.cz . ",
Documentation.Version = " 1.0 ",
Documentation.Author = " Štěpán Rešl "
]
in
Value.ReplaceType(
output,
Value.ReplaceMetadata(
Value.Type(output),
documentation
)
)