Thursday, July 7, 2011

The easiest way to parse Google Spreadsheets with PHP

After tinkering with the available publishing options for Google Docs Spreadsheets, I landed on the following.

$jsonData = file_get_contents("");
var_dump(json_decode($jsonData, true));

This makes the assumption that your spreadsheet content is not private and is OK to "publish as a web page".