Professional Documents
Culture Documents
New Text Document
New Text Document
csv
// Result is returned as the table with one row, convert it to text type
ChangeTypeToText = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
TakeDataValue = ChangeTypeToText{0}[Column1]
in
TakeDataValue
in instrument
let
Source =
Csv.Document(Web.Contents("https://archives.nseindia.com/content/nsccl/
fao_participant_oi_" & Date() & ".csv")),
#"Renamed Columns" = Table.RenameColumns(Source,{{"Column2", "Future Index
long"}, {"Column3", "Fuure Index Short"}, {"Column4", "Future Stock Long"},
{"Column5", "Future Stock short"}, {"Column6", "Option Index Call Long"},
{"Column7", "Option Index Put Long"}, {"Column8", "Option Index Call Shart"},
{"Column9", "Option Index Put Short"}, {"Column10", "Option Stock Call Long"},
{"Column11", "Option Stock Put Long"}, {"Column12", "Option Stock Call Short"},
{"Column13", "Option Stock Put Short"}, {"Column14", "Total Long"}, {"Column15",
"Total Short"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Total
Short", type number}, {"Total Long", type number}, {"Option Stock Put Short", type
number}, {"Option Stock Call Short", type number}, {"Option Stock Call Long", type
number}, {"Option Stock Put Long", type number}, {"Option Index Put Short", type
number}, {"Option Index Call Shart", type number}, {"Option Index Put Long", type
number}, {"Option Index Call Long", type number}, {"Future Stock short", type
number}, {"Future Stock Long", type number}, {"Fuure Index Short", type number},
{"Future Index long", type number}})
in
#"Changed Type"