We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've been trying to get a sketch running with the Google spreadsheet API for the past couple of days. Found a couple of great articles that really helped but have hit one slightly killer roadblock, writing to the spreadsheet.
I can read in about 20 different ways but whichever command/technique/method I try and use to send information i get an exception. Has anyone tried to do this sort of stuff recently?
A few sites/links that sorted me out this far...
https://developers.google.com/google-apps/spreadsheets/ - Google's home for the API
http://makezine.com/2010/12/10/save-sensor-data-to-google-spreadsh/ - couldn't get the writing part of this to work but could reuse the setup to read
http://blog.blprnt.com/blog/blprnt/open-science-h1n1-processing-and-the-google-spreadsheet-api - Blog article about data collection, works like a charm but doesn't include write functions. Added the code below to the end of SpreadsheetManager class
void setCellValue(int col, int row, String data) {
URL cellFeedUrl = worksheetEntry.getCellFeedUrl();
try{
CellFeed cellFeed = myService.getFeed(cellFeedUrl, CellFeed.class);
CellEntry input = new CellEntry(col,row,data);
println(input.getCell().getRow());
input.changeInputValueLocal(data);
println(cellFeed);
input.update();
//OR
//myService.insert(cellFeedUrl, input);
}catch(Exception e){
println("Data couldn't be added");
}
};
Answers
Hi sebandraos, I'm trying something similar, Did you have any luck writing to the google sheets in the end??
The Sheets API has changed a lot in the past years, and is now at v4. Checkout the official documentation here, rather than trying to make outdated examples work:
Hello, Sebandraos
Go through SSIS Google Sheet API Product.
Here all things about Google spreadsheet API are described from the beginning and it's easy to understand so check it out hope it's helpful for you...