Back to Stormglass.io in Google Sheets
SheetXAI logo
Stormglass.io logo
Stormglass.io · Google Sheets Guide

Fetch Solar Irradiance Data From Stormglass Into a Google Sheet

2026-05-14
5 min read

The Scenario

You're a solar energy consultant, and the client handed you a sheet with 15 potential farm sites — just latitude and longitude. They want a 30-day GHI and UV index projection for each one so you can model annual production estimates before the site visit next week. You have never had to model fifteen sites at once before. The last project was three.

The bad version:

  • Read the Stormglass solar endpoint documentation, figure out which parameters to pass for global horizontal irradiance and UV index, then run a call for site one.
  • Parse the daily array in the response — 30 entries, each with a GHI value buried in a nested object — and paste the 30 values into column C starting at row 2.
  • Repeat for sites two through fifteen, mentally tracking whether you're filling the right column range for each site as you scroll down the sheet.

By site seven, your column C has a two-row gap from a copy-paste slip and you're not sure whether to fix it now or flag it for later.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the site coordinates in columns A and B, understands that you want a 30-day daily solar data series, and through its built-in Stormglass.io connection it fetches GHI and UV index for every site and writes the daily values into the adjacent columns — without you having to navigate the endpoint structure or parse a single JSON response yourself.

For each coordinate pair in columns A and B, fetch solar irradiation data from Stormglass for the next 30 days and write the daily GHI values into column C. Also write the daily average UV index into column D. Use the site name from column E as a row label if present.

What You Get

  • Column C filled with the daily GHI value (W/m²) for each site across the 30-day window — one value per site row, representing the daily average.
  • Column D filled with the UV index for the same window.
  • Site name from column E repeated as a label so the output table is readable without cross-referencing another tab.

What If the Data Is Not Quite Ready

You need each of the 30 daily values as separate rows, not a single averaged value

The energy model your firm uses needs day-by-day GHI input, not a 30-day average.

For each coordinate in columns A and B, fetch Stormglass solar data for the next 30 days and write each day's GHI and UV index as a separate row in the Solar Output tab — one row per day per site, with site name, date, GHI, and UV index in columns A through D.

Several sites are listed as "Under Review" and should be excluded from this run

The client marked three sites as pending environmental clearance, and including them in the model adds confusion.

For rows where column F does not say "Under Review," fetch Stormglass solar irradiation data for the next 30 days and write daily GHI into column C and UV index into column D. Skip rows flagged as "Under Review."

Some coordinates are in the wrong hemisphere and the irradiance values look wrong

A handful of sites in the southern hemisphere were entered with the latitude sign flipped. You need to check and correct before fetching.

Check column A for latitudes that appear to be sign-flipped based on the site names in column E — if a site labeled "Southern" has a positive latitude, flip it to negative. Then fetch Stormglass solar irradiation data for the next 30 days for every corrected coordinate and write GHI into column C.

Validate coordinates, exclude review sites, fetch 30-day series, flag low-irradiance sites

Your full pre-analysis checklist: fix any sign-flipped latitudes, skip sites under review, fetch 30-day GHI and UV index for the rest, and mark any site where average daily GHI falls below 4.0 kWh/m² as "Low Potential" in column G.

Fix any sign-flipped latitude values in column A based on site names in column E, skip rows where column F says "Under Review," then fetch Stormglass solar irradiation data for the next 30 days for each valid coordinate. Write daily GHI into column C and UV index into column D. Calculate the 30-day average GHI and write "Low Potential" in column G for any site averaging below 4.0.

Combining the validation pass with the data fetch means you're handing the client a model-ready sheet, not a half-cleaned draft.

Try It

Get the 7-day free trial of SheetXAI and open any Google Sheet with site coordinates, then ask it to pull Stormglass solar irradiance data for each location across your planning horizon. The Stormglass.io integration is included in every SheetXAI plan. Also see fetching weather forecasts by coordinate or the Stormglass.io overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more