Open Source Python API for Google Sheets

Create, Share, Parse & Modify Excel XML Spreadsheet Files via Open Source Python Library.

 

Gspread is an open source Python implementation for Google Sheets.  The library enables computer programmers to create, open and modify a spreadsheet file from their own Python applications.  More & more people are choosing to use online services like Google Sheets by each passing day.  

Several important features are fully supported by the Gspread library, such as creating new spreadsheet, selecting and sharing a share a spreadsheet, worksheet creation, deleting worksheet,  getting a cell value, getting values from a column as well as from a sheet row, searching a cell, updating a cell value, getting value from a cell as a list and many more.

Getting Started with Gspread

You need to have Python 2.7 or higher installed on your system to run Gspread smoothly. The recommended way to install via PIP. Please use the following command.

Install Simple Excel-PHP via Git

pip install gspread  

Create & Share Spreadsheet via Python Library

The Gspread API provides features for new spreadsheet creation and modification. It allows software programmers to create a blank spreadsheet inside their own Python applications with just a few commands. Please remember that the new spreadsheet will be visible to the script's account only. For accessibly the newly created spreadsheet must be shared with your email.  You can easily create a worksheet inside it.

Opening Spreadsheet via Python

The Open Source spreadsheet library Gspread allows software developers to Convert CSV Files to Excel 2003 XML file format with just a few lines of code. First of all, you need to load a CSV file from the server to be parsed and transfer data from parser to writer and change the writer type to XML. After that save the file with the specified name and specified target.

Parse Excel 2003 XML File

The Gspread library gives developers the capability to open an available spreadsheet by providing its title as it appears in Google Docs. To be precise you need to provide the key which can be taken from the URL of the spreadsheet. You can also provide the complete URL if you feel difficult to extract the key. You can also select a specific worksheet or list of all available worksheets.

Working with Spreadsheet Cells & Rows

It’s a very common practice to copy data from one or more worksheet cell to others. The Gspread API provides full support for manipulating cell data.  You can easily get value from a cell or from spreadsheet rows and columns. The API also provides features getting all values from a worksheet as a list of lists. You can also search a cell with exact value as well as find a cell equivalent with regular expression.