Connect Angel One to MarketXLS India and use AngelOneHistory to retrieve historical candles in Excel. The same workbook can retrieve a past closing price or volume without a separate script.
Try it in your own spreadsheet
Get the free MarketXLS sample workbook (.xlsx).
No account needed. MarketXLS live data requires a paid plan. Preview workbook
Get MarketXLS India: plans and subscription · See the India Excel add-in
Start with this formula
After connecting the required broker in the India add-in, enter:
=MXLSIN.AngelOneHistory("SBIN", "day", "2026-01-01 09:15", "2026-03-31 15:30")
Use the example as a starting point and replace its instrument, date range or cell references with your own inputs. Historical dates in examples are sample periods; expiry-specific symbols must refer to a valid contract.
Set up the worksheet
- Open Excel and install MarketXLS India from the add-in marketplace.
- Sign in with your MarketXLS India account. For broker data, connect Zerodha or Angel One using the add-in panel. Use the broker named by a broker-specific formula.
- Enter the formula in an empty area. Leave adjacent cells clear for any table or multi-cell output.
- Confirm the instrument and settings before extending the worksheet.
Complete the Angel One connection in the add-in before entering the history formula. Begin with a supported equity symbol and a short daily date range. Put your symbol and dates in clearly labelled cells so another request only requires changing those inputs.
Build the working example
Keep each historical table on its own sheet or leave enough room between tables. When comparing symbols, join on the returned date, not row position. This prevents a missing observation in one instrument from shifting all later comparisons.
Functions and syntax
These examples use the India namespace, MXLSIN.. Square brackets in a syntax line indicate optional arguments; do not type the brackets into Excel. Keep text arguments in quotation marks and use cell references when you want editable inputs.
AngelOneHistory
Returns historical OHLCV candles for a symbol from Angel One. Intervals from 1 minute to daily.
Syntax:
MXLSIN.AngelOneHistory(symbol, interval, fromDate, toDate)
Example:
=MXLSIN.AngelOneHistory("SBIN", "day", "2026-01-01 09:15", "2026-03-31 15:30")
AngelOneCloseHistorical
Returns the closing price for a symbol on a specific past date from Angel One.
Syntax:
MXLSIN.AngelOneCloseHistorical(symbol, date)
Example:
=MXLSIN.AngelOneCloseHistorical("RELIANCE", "2026-10-01")
AngelOneVolumeHistorical
Returns the traded volume for a symbol on a specific past date from Angel One.
Syntax:
MXLSIN.AngelOneVolumeHistorical(symbol, date)
Example:
=MXLSIN.AngelOneVolumeHistorical("RELIANCE", "2026-10-01")
Check the result
Use the interval spelling accepted by the history function. Do not assume that an interval label from another broker or a live indicator is interchangeable. Check broker availability before requesting a long intraday period.
If Excel reports #NAME?, confirm the India add-in is loaded and the function name is spelled correctly. If a table reports #SPILL!, clear the cells in its output area. For missing broker data, check the connection in the add-in panel, verify the symbol, and test one request before expanding the sheet. Do not replace an error with zero when zero would change your analysis.
Can I use this for a stock watchlist?
Yes. Start with a small set of instruments and separate output ranges. Retrieve only the data you need; adding overlapping large requests makes a workbook harder to troubleshoot.
Get this working in your Excel
Choose a MarketXLS India subscription, install the India add-in, and follow the steps above. The pricing page lists the current subscription options; broker access requirements are separate from the spreadsheet formulas.
Use the India function library for the complete parameter reference, or contact the India team with the formula, instrument and error message if you need setup help. Never send broker passwords or access tokens.
Continue with the India Excel workflow series for related guides.
