Sheets API access with PHP part 4: Editing Cells

cellfeedHere’s how to get up to speed with the Google Sheets cell-based feed and PHP.

My previous posts have illustrated the use of Google’s PHP API client to interact with Google Sheets using list-based feeds.  This method is ideal for reading from and writing to spreadsheets that have a single header row, but isn’t useful for more complicated sheets.

The cell-based feed allows individual cells to be read and written.  I’ve written some example PHP code that implements the cell-based feed methods to help get you up to speed a little quicker.  Google documentation is here.

To start, follow the steps in this post to set up your service account, share a spreadsheet, and install the API client.  Then you should be able to adapt my example code to interact with your spreadsheet.

Please let me know if you have any comments or questions!

Leave a Reply

Your email address will not be published. Required fields are marked *