# Pakistan economic data in Excel and Google Sheets

You don't need to write code to use PakDataHub. Every series is available as CSV, so your spreadsheet can load it directly and keep it current.

## Google Sheets: one formula

```
=IMPORTDATA("https://api.pakdatahub.com/v1/series/fx.rate.avg.usd?format=csv&sort=asc&from=2020-01-01&api_key=pk_live_xxx")
```

That fills four columns (`series`, `date`, `value`, `dims`) with the monthly USD/PKR rate, which was 277.92 for August 2026, and Sheets refreshes it periodically. Swap the id for anything in the catalog:

| You want | Id |
|---|---|
| Inflation (YoY %) | `inflation.cpi.national.yoy` |
| 6-month KIBOR | `rates.kibor.6m` |
| SBP reserves | `reserves.total_sbp_reserves` |
| Remittances | `remittances.total` |
| Flour price, Lahore | `commodities.wheat_flour` with `&dims=city:lahore` |

**Prefer functions to URLs?** Install the free [PakDataHub Sheets script](https://pakdatahub.com/docs/spreadsheets.md) and write `=PAKDATA("fx.rate.avg.usd", "2020-01-01")` or `=PAKDATA_LATEST("rates.kibor.6m", "side:offer")` instead. Your key is stored once in the script's settings, not in a URL in a cell.

**Tip:** anyone who can see the sheet can see the key, so use a dedicated key for shared sheets and revoke it later from the dashboard.

## Excel: Power Query, key kept out of the URL

1. **Data -> Get Data -> From Other Sources -> From Web -> Advanced**.
2. URL: `https://api.pakdatahub.com/v1/series/inflation.cpi.national.yoy?format=csv&sort=asc`.
3. Header: `X-API-Key` = your key.
4. **Load**. **Refresh All** pulls the latest month.

## Growth rates without formulas

Let the API compute year-on-year change and save yourself the spreadsheet formulas:

```
=IMPORTDATA("https://api.pakdatahub.com/v1/series/remittances.total?format=csv&sort=asc&transform=yoy&api_key=pk_live_xxx")
```

The transforms are `yoy`, `mom`, `pct_change`, `3ma` (moving average) and `index` (rebase to 100).

The full guide, including Power BI, is in [Excel, Google Sheets & Power BI](https://pakdatahub.com/docs/use-case-excel-sheets-bi.md). A free key includes 500 API calls a month, and each refresh uses one.

---
Published 2026-09-25 - https://pakdatahub.com/blog/pakistan-economic-data-excel-google-sheets
