The Scenario
You are a football analytics consultant. Your client is a sports media agency that needs a Premier League team stats comparison table for a broadcast rights presentation next Thursday. They want season-long statistics for all 20 clubs: shots on target, clean sheets, average possession, goals scored, and goals conceded, in an Excel workbook that matches their slide template.
You have the client's template. You do not have the data.
The bad version:
- You look up the teams/statistics endpoint in the API-Sports docs
- You try Power Query with a web connector — the API key in the URL returns a 401 because API-Sports requires it in the header, not the query string
- You write a Python script, call the endpoint 20 times, get possession values back as strings with percent signs
- You clean the possession column, rerun, discover that three team IDs in your list are wrong and return null
- You fix the IDs, rerun, export to CSV, open in Excel, and reformat the column headers to match the client template
- It is Wednesday night, the presentation is tomorrow morning, and you have not started the slides.
The faster version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook that calls the team statistics endpoint for every Premier League club in one pass.
Open the SheetXAI sidebar and type:
Fetch season statistics for all teams in the Premier League (league ID 39, season 2024) and write team name, goals scored, goals conceded, clean sheets, and average possession into columns A through E, one row per team. Parse possession as a number, not a string with a percent sign. Sort by goals scored descending.
SheetXAI calls the API-Sports teams/statistics endpoint for all 20 clubs, parses possession into a clean numeric value, and writes the full comparison table sorted by attacking output.
What You Get
A 20-row comparison table ready for the client workbook:
- Team name — all 20 Premier League clubs
- Goals scored and conceded — season totals
- Clean sheets — goalkeeper and defensive efficiency metric
- Average possession — as a clean number, not a string with a percent symbol
The sort order gives you the attack-minded clubs at the top by default, which is the natural reading order for a broadcast partner focused on offensive output.
What If the Data Is Not Quite Ready
Client workbooks usually need analytical layers. SheetXAI can add them before Thursday.
When the client wants a defensive tier label
Goals conceded is in the table but your client wants a tier label — Top 6 Defence, Mid Table, or Leaky — based on goals conceded per game.
Calculate goals conceded per game for each team. Add a 'Defensive Tier' column: Top 6 Defence for the 6 teams with the lowest rate, Mid Table for the next 8, Leaky for the bottom 6. Write the tier labels into column F.
When average possession data is missing for two newly promoted clubs
Two clubs have incomplete possession tracking for the first part of the season.
For any row where average possession is blank or zero, write 'Insufficient Data' into that cell. Add a footnote row at the bottom flagging which clubs have incomplete possession data.
When the client wants three sorted views for different slides
Slide 3 needs the table ranked by goals scored. Slide 5 needs it ranked by clean sheets. Slide 7 needs it ranked by possession.
Create three workbook tabs: 'By Goals' sorted by goals scored descending, 'By Clean Sheets' sorted by clean sheets descending, and 'By Possession' sorted by average possession descending. Keep all five data columns in each tab.
When the client wants the full stats brief with tier labels and a summary tab in one pass
You have no data and the presentation is in 18 hours.
Fetch season statistics for all 20 Premier League teams (league ID 39, season 2024). Write team name, goals scored, goals conceded, clean sheets, and average possession to the main tab sorted by goals scored. Add a Defensive Tier column. Create 'By Clean Sheets' and 'By Possession' sorted tabs. Create a 'Top Performers' tab listing the team ranked first in each of the five categories with their stat value.
The pattern: instead of pulling the data and building three sorted views and a summary tab across four separate tasks, you describe the full deliverable and SheetXAI builds all of it before the presentation.
Try It
Get the 7-day free trial of SheetXAI and ask it to pull season-long statistics for all teams in a league directly into your Excel workbook. The API-Sports integration is included in every SheetXAI plan. For related workflows, see how to pull a full season fixture list and standings in Excel or the API-Sports in Excel overview.
