You can not use GetHistData as Excel function in a cell as this function returns array.
In our sample excel workobook, we added a sub that will download OHLC using GetHistData and write it to a excel sheet.
You can use that sub as a reference or modify it to suit your requirement.
To get OHLC data you need to subscribe for Historical API.
Edit your existing subscription in developer console and subscribe Historical API (
No need to create new separate subscription for Historical API, and our excel will not work with standalone Historical API subscription)