Integrated Tech Solutions

How to Use Google sheet as Database for Dynamic Website

By - Admin 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

You Asked,
We made it!

fix japanese keyword hack

Step by Step Video Tutorials on trending topics in software development

Yes I am Curious »

WordPress or React – How to choose the best Tech stack for your website

Are you still confused in picking the best Tech stack for your website? Choosing the right tech stack for your...

Know More »

5 Tips to Pick the Most Engaging Live Chat for Your Website

In today’s fast-paced digital world, providing excellent customer service is a key differentiator for businesses. One of the most effective...

Know More »