Integrated Tech Solutions

How to Use Google sheet as Database for Dynamic Website

By - Admin, Updated on February 13, 2022

Introduction

Google Sheets is one to the most handy tools we use in our daily life. We often use it for various purpose including Accounts, Employees Data etc.

Make the spreadsheet public

How to Use the Opensheet API

https://opensheet.elk.sh/spreadsheet_id/sheet_name

You can easily copy the spreadsheet_id from the URL of the Google sheet.

PHP Code Example to Print Spreadsheet data into HTML Table

<?php
    echo '<table>';
    $data = json_decode(file_get_contents("https://opensheet.elk.sh/1o5t26He2DzTweYeleXOGiDjlU4Jkx896f95VUHVgS8U/1"));
    foreach($data as $row){
        echo '<tr>';
            foreach($row as $column){
             echo '<td>'.$column.'</td>'  ; 
            }

          echo '</tr>';  
    }
echo '</table>';
?>

Keep Reading

👋 Hi, Find this Helpful? There is More

20 Most asked Odoo Interview Questions

Odoo Accounting Interview Questions

Know More »
shopify sections and blocks

How to create Custom Sections in Shopify[Dawn Theme]

Are you looking to customize your Shopify store beyond the standard templates and themes? Do you want to create unique...

Know More »
fix japanese keyword hack

Looking for Video Tutorials?

Explore Our Youtube Channel for in-depth Tutorials

Yes I am Curious »