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 »

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 »
next js deployed on aws

Beginners Guide to deploy NextJs App on AWS EC2 Server

In this blog post, we will walk you through the step-by-step process of deploying a Next.js application on an AWS...

Know More »