Import Hi Energy AI data into Excel
These guides show marketers, publishers, and analysts how to call the Hi Energy AI REST API
from Excel VBA macros with WinHttp.WinHttpRequest.5.1, authenticate using
X-Api-Key, paginate results, flatten JSON responses, and write rows into worksheets.
Each resource page includes copy-paste code you can drop into the VBA editor.
Resource guides
Transactions
Sales and commissions via GET /api/v1/transactions.
Open Transactions Excel macro guideAuthentication for Excel VBA
Prefer the X-Api-Key header with your personal API key. The samples read the key from
a Config worksheet (HIENERGY_API_KEY) so secrets stay out of hard-coded module constants when possible.
http.SetRequestHeader "X-Api-Key", GetHiEnergyApiKey()
http.SetRequestHeader "Accept", "application/json"Setup in Excel (VBA macros)
- Open Excel on Windows (or Excel for Mac with VBA support) and enable the Developer tab: File → Options → Customize Ribbon → Developer.
-
Get your personal API key from
API key docs.
Prefer the
X-Api-Keyheader (these samples already do). -
Create a worksheet named
ConfigwithHIENERGY_API_KEYinA1and your key value inB1. Optionally setHIENERGY_API_BASEinA2/B2. - Press Alt+F11 → Insert → Module. Paste the shared client library, then add a second module for the resource import macro below.
- In the VBA editor choose Tools → References and enable Microsoft Scripting Runtime.
-
Save as a macro-enabled workbook (
.xlsm), then run the import with Alt+F8 (or Developer → Macros).