Getting PrestaShop data into Google Sheets

PrestaShop has a SQL manager built in, so this looks solved. It mostly is — until the query you need is slow, the export is capped, or the multi-language joins quietly double your revenue.

Why the built-in route runs out

PrestaShop's back office has an SQL manager: write a SELECT, get a CSV. For a small shop that genuinely is the answer, and you can stop reading. The catch is where that query runs — on your production database, from the same PHP process serving the shop, with whatever execution limits your host imposes. A query across a year of orders can take long enough to hit them.

Then there's the join problem. Product and category names live in _lang tables, and multi-shop installs split rows again across _shop variants. Miss a language filter and every product appears once per language: your top-seller list looks plausible and your totals are quietly multiplied. It's the most common way a PrestaShop export is wrong without looking wrong.

Finally, volume in the wrong places. A typical install carries several hundred tables, and the biggest are ps_connections, ps_guest and ps_pagenotfound — visitor tracking that on one production store we sync accounts for roughly 97% of all rows. None of it belongs in a spreadsheet, but it's in every naive export of "the database".

Three ways to get there

All three end in a spreadsheet. The difference is where the query runs and how much you trust the number when it arrives.

The built-in SQL manager

Advanced Parameters → SQL Manager: write a SELECT in the back office and download the CSV.

  • Already there, nothing to install or pay for
  • Real SQL, so you control the definitions
  • Every query runs against the live shop, under your host's time limits
  • No saved history worth the name, no scheduling
  • Nothing warns you when a _lang join has duplicated your rows

An export module

A paid module that exports orders and products on a schedule, sometimes straight into a Google Sheet.

  • Scheduling without writing anything
  • Some push to Sheets directly, which is genuinely convenient
  • Another module on a production shop, to update and trust
  • Fixed column sets that rarely match the question you have
  • The export still executes against the live database

Query a PostgreSQL copy, publish the answer

BeQuery

BeQuery clones the shop into an isolated PostgreSQL copy, tracking tables excluded. You query the copy and export a result that's already aggregated.

  • Long analytical queries can't touch your storefront, whatever they cost
  • No time limits inherited from PHP or your host
  • Ready-made PrestaShop insights — revenue, margin, LTV, restock — with the _lang joins already right
  • Saved queries mean this month's number is built the same way as last month's
  • The sheet pulls from us rather than being written to, so refreshes happen on Sheets' clock — roughly hourly
  • The copy is as fresh as your sync schedule, not to the second

The path that stays usable, step by step

  1. 1

    Connect your store to BeQuery

    Read-only MySQL credentials, host and port. BeQuery clones the database into an isolated PostgreSQL copy that only your team can reach — the shop itself is only ever read.

  2. 2

    Write the question as a query, not an export

    This is the step that decides whether the spreadsheet survives. In the SQL editor, aggregate first: revenue by month, margin by product, customers by cohort. You want the answer, which is hundreds of rows, not the raw orders table, which is hundreds of thousands.

  3. 3

    Publish it as a link, or export it once

    Save the query, then either export CSV or XLSX from the editor for a one-off, or publish the query as a CSV link. XLSX exports are capped at 500,000 rows; CSV will happily hand you more than a spreadsheet can hold, which is another reason to aggregate first.

  4. 4

    Paste the formula and let Sheets refresh it

    Drop =IMPORTDATA("…your link…") into a cell. Sheets fetches it on its own — roughly once an hour — so the tab stays current without anyone exporting anything again. Build your charts and pivots on top of that range. The link is a password in URL form: anyone who can see the formula can read the results, and you can revoke it from BeQuery at any time.

Is a spreadsheet the right home for this?

For a lot of PrestaShop analysis, yes. There's a fairly clear line where it stops being true.

Yes — Sheets earns its place

  • You want to work the numbers by hand, or hand them to someone who will
  • You're mixing shop data with costs, targets or supplier prices that only exist in a spreadsheet
  • The question is one-off and you want it answered in ten minutes

You've outgrown it — use a dashboard instead

  • The report is really a dashboard: several people open it and nobody edits a cell
  • The exports have grown big enough that the sheet has become slow
  • Two people have produced two different revenue figures for the same month

Common questions

Why does my PrestaShop export show more revenue than the back office?

Nine times out of ten it's a _lang or _shop join multiplying rows: join ps_product to ps_product_lang without filtering id_lang and every product appears once per installed language. The other common cause is counting order states that shouldn't count — carts, cancelled and refunded orders sitting alongside valid ones.

Can I export from the SQL manager on a schedule?

Not natively — it's a manual download each time. Modules add scheduling, at the cost of running the query against production on a timer. Querying a copy sidesteps the trade-off entirely: the query can be as heavy as it likes because nothing depends on the database it runs against.

Can a sheet refresh itself, or is this manual every time?

It can refresh itself. Publish a saved query as a CSV link, paste =IMPORTDATA("…") into a cell, and Sheets refetches it on its own — about once an hour. Worth being precise about the direction: BeQuery doesn't write into your spreadsheet, the spreadsheet pulls from BeQuery. Nothing is pushed, nothing is stored in Google on our side, and revoking the link stops it immediately.

How safe is that link?

Treat it as a password. It's fetched anonymously by Google, so the URL itself is the credential — anyone holding it, including anyone who can open your spreadsheet and read the formula, can see that query's results. It's deliberately narrow: one saved query, read-only, row-capped, and revocable. We store only a hash of it, which is why it's shown once when you create it and can't be retrieved afterwards. For anything sensitive shared widely, use Looker Studio on a read-only connection instead.

Why not connect Sheets straight to my shop's database?

Google Apps Script can open a JDBC connection to MySQL, so it is technically possible. It means exposing your production database to Google's IP ranges, writing and maintaining the script, and having every refresh query the same server that serves your customers. It's a lot of moving parts to end up with a spreadsheet that occasionally times out.

How much data can a spreadsheet actually hold?

Google Sheets caps a spreadsheet at 10 million cells across all its tabs. That sounds enormous until you divide by columns: a 20-column export runs out at around 500,000 rows, and performance gets unpleasant well before the hard limit. Aggregated results are never a problem; raw order lines from a busy store are.

See it on your own store first

Free tier, no credit card, read-only access. Production is never written to — and you can explore the demo store before connecting anything.