Last active
August 29, 2015 14:23
-
-
Save petermreid/57c7db8ad8b3251a2cc8 to your computer and use it in GitHub Desktop.
Yahoo Quotes Portfolio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
PortfolioSource = Excel.CurrentWorkbook(){[Name="Portfolio"]}[Content], | |
#"sParam" = Text.Combine(Table.ToList(Table.SelectColumns(PortfolioSource, "Symbol")),","), | |
#"Fields" = Excel.CurrentWorkbook(){[Name="FieldLookup"]}[Content], | |
#"DisplayFields" = Table.SelectRows(#"Fields",each [Display]=true), | |
#"fParam" = Text.Combine(Table.ToList(Table.SelectColumns(#"DisplayFields", "f")),""), | |
#"DisplayColumns" = Table.ToList(Table.SelectColumns(#"DisplayFields", "Name")), | |
#"TypeNames" = Table.SelectRows(Table.SelectColumns(#"DisplayFields", {"Name","Type"}), each [Type]="number"), | |
#"ColumnTypes" = Table.AddColumn( #"TypeNames", "AsType", each type number), | |
#"ColumnTypesList" = Table.ToRows( Table.SelectColumns(#"ColumnTypes",{"Name","AsType"})), | |
#"YahooSource"= Csv.Document(Web.Contents("http://download.finance.yahoo.com/d/quotes.csv?s=" & #"sParam" & "&f=" & #"fParam"), #"DisplayColumns"), | |
#"TypedYahooSource" = Table.TransformColumnTypes(#"YahooSource", #"ColumnTypesList") | |
in | |
#"TypedYahooSource" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment