xPLGSheet

xPLGSheet

Description:xPLGSheet allows you to query, revise and add entries to a simple Google Docs Spreadsheet. An obvious use of this is to automatically accumulate statistics into a spreadsheet that's accessible anywhere you use the Internet. Another use could be as a database to store events which can be synchronized to different machines across the Internet. For example, you can have xPLGSheet at your vacation house update fields when motion sensors are triggered. Then from your main house, you can poll those fields periodically using a local copy of xPLGSheet so you know what's going on there.
Usage:As usual, you'll need to create a config.txt file in the same directory consisting of a GMail username, password:
gmail_name,gmail_password

We'll use the following sample spreadsheet to explain how to use xPLGSheet. The spreadsheet is called 'test', it has 1 worksheet 'Sheet1' which has 3 columns labeled 'date', 'field1' and 'field2'.  To make this work, I created my own set of schemas which are described below.  



type = xpl-cmnd
gsheet.basic
{
   ssheet=test
   wsheet=Sheet1
   command=add
   data=date=01/02/2010,field1=TESTDATA,field2=BLAH
}
This command will add a row to Sheet1 of spreadsheet test and fill in the three fields date, field1 and field2 with 01/02/2010, TESTDATA and BLAH, respectively.

type = xpl-cmnd
gsheet.basic
{
   ssheet=test
   wsheet=Sheet1
   command=query
   data=key=date=01/02/2010,query=field1
}
This command will query the spreadsheet.  The search key is row where date equals 01/02/2010 and it will return the value of field1 in a sensor.basic message.

type = xpl-cmnd
gsheet.basic
{
   ssheet=test
   wsheet=Sheet1
   command=set
   data=key=date=01/01/2010,query=field2,set=XYZ
}
This command will query the spreadsheet, searching for the row where date=01/01/2010 and it will set field2 in that row to XYZ.

Revisions:02/02/10 - 1.0: Initial release
Download:/downloads/xPLGSheet.zip

Back to xpl Software