Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

How to export DB data to Google Sheets

I have been looking at Laravel Excell which is well documented however offers to mention of how to export out via an API. I have also found an article from "Drive Marketing" giving step by step instructions on how to use the Kawax code.

https://drivemarketing.ca/en/blog/connecting-laravel-to-a-google-sheet/

Before I go and spend hours trying to get any of this work, I was wondering whether anyone had success in exporting DB table data out to a Google Sheet?

Many thanks !

0 likes
7 replies
jlrdw's avatar

You could export to csv. See if Google sheets will open csv, it should.

vincej's avatar
Level 15

Sure. Laravel Excell exports in a wide variety of format, and if you have a spreadsheet on your computer, then it will open the data in a sheet. I have implimented Laravel Excell and use Libre Office and it works well.

However, ideally, I would like to send the data via an api straight to a cloud based google sheet template, such that when you opened the sheet, voila, there was the data.

jlrdw's avatar

When you open a csv it should be there, I open bank exported csv in excel all the time, csv is just an extension.

What extension are you wanting to open?

Hey, I also do a few things in Libre Office Base.

vincej's avatar
Level 15

It is all there in Libre Office, no problem. Furthermore I open it as an xls file. That's all good. My user wants it in a Google Sheet, which by definition means cloud based and exporting it from Laravel in json over a Google API.

vincej's avatar
Level 15

Nope - I just assumed that every API requires json. All I want is that my user can open the data in Google Sheets.

Please or to participate in this conversation.