If you want NSE free data,
then use Romeo bhai link. You find a way to download that data to file. Direct excel may not work bcos of internet headers not set properly.
To import JSON data to excel, you need MS Excel 2016+ and use power query to import.
How to Parse Custom JSON Data using Excel - The Excel Club
one good thing about API is that the JSON has two objects for Total CE OI, and PE OI calculated so no need to add all strikes, but it is total for current expiry. not grand total of all expiries.
View attachment 48975
this is output from json formatter
when i was downloading data with this api, i had modified my internet explorer to show json data in browser n then download as a simple text file n not save as json file, it can be done by a simple edit in registry
Windows Registry Editor Version 5.00
;
; Tell IE to open JSON documents in the browser.
; 25336920-03F9-11cf-8FD0-00AA00686F13 is the CLSID for the "Browse in place" .
;
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\text/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00