Google Docs API - Spreadsheets which are Form Responses - forms

So, I'm using the Google Docs API to extract spreadsheets programmatically.
However, I'm only interested in spreadsheets which are live feeds from form responses (survey responses). Is there a way of detecting this? So far the only approach I have is that the spreadsheet has a 'Form Responses 1' tab, which is quite a long way into the process; ideally I'd like to know before I download the file.
I'd be overjoyed by solutions which start with the form and tell you the relevant spreadsheet; ones which verify if a spreadsheet is a form's output are okay; knowing it's impossible would be helpful.

It is possible to get a list of the worksheets by using the Spreadsheets API.
Here is a link to the relevant documentation.
https://developers.google.com/google-apps/spreadsheets/#retrieving_information_about_worksheets

The only way I know this is possible is by using Apps Script, which is Google Apps's scripting language based on Javascript.
You can use Form.getDestinationId() to find the target spreadsheet, like in this example :
function myFunction() {
var form = FormApp.openById('1af5Ur_7IPHOXxdyqVXFF4tFA4WHx6PLf9uL56iPLMgI');
Logger.log(form.getDestinationId())
}
More info about Apps Script's Form capabilities here.
Note that Apps Script has very limited integration capabilities, so if you're trying to build an integrated webapp it might get complicated (but not impossible).

Related

show diff on word documents

I'm designing a web application that will enable users to upload docx documents and will the show the diff between each revision.
I don't know how to approach the problem. Is it a bitmap, how do I decode the doc to show changes. Do Microsoft has an API I can use to simply send 2 word docs, and it will return the changes between the two?
I also have the same question on google docs. I think with google drive it's simpler. Saw this API
If anyone has done something similar or has an example to some similar app, I would be grateful.
Have you looked at Word's Compare tool? See under Review|Compare. Word's API also support the compare tool's automation (e.g. via VBA).
To use Word's API, you'll need to automate Word. For the details of the method, see: https://msdn.microsoft.com/en-us/library/office/hh128820(v=office.14).aspx
See also: https://code.msdn.microsoft.com/windowsdesktop/Compare-Two-Word-Documents-043b2e1d

Import feed to Google Spreadsheet

Trying, for funsies, to make Google Spreadsheet read comments from FaceBook. I have discovered that FaceBook actually uses an API for this, and I've been here and made the code to actually export it in a manner I find most convenient. Now I just need to make Google Spreadsheet somehow read it.. My first thought was to use the different import ways they have (IMPORTXML, IMPORTDATA, IMPORTFEED, IMPORTHTML and IMPORTRANGE). The IMPORTRANGE is a quite obvious no go in my book, and so far I've had no success with the other ones. Am I still too far off importing it, or is there hope? If I get the code a cURL I can just use a (really) long string in my web browser and get something I can surely extract data from, though I would only be able to do it locally, the goal with this is that it will be set globally so to speak.
Solved it using "How to import JSON data into Google Spreadsheets in less than 5 minutes", it instructed me to make a custom script in my sheets and paste this script in it including the generated text, and then simply use the new formula "ImportJSON". Worked like a treat :D Do I just delete this post or simply keep it as is?.. Still kinda fresh to Stack Overflow :P

Swift Read HTML elements on webpage

I am trying to read a specific text on a website, and I was wondering how I would proceed doing so. I am trying to get the followers-count on the instagram website, to then retrieve it in my app and display it. How would I proceed with this?
I have searched both Google and GitHub for parser, with no luck - and there is no tutorial on YouTube explaining how to do this.
Thanks in advance.
Usually for something like this, you'll want to use the official API.
Isolating and reading an element in web page is likely not what you want to do. An API gives you access to parts of a service an application might need to interact with, just like this.

Script to fill browser form

I have little business problem, I need to make a script to fill (not send) out browser forms(only simple textfields, checkboxes and drop downboxes).
I need to launch multiple windows with the same form with different data to speed up form filling
What kind of scripting/programming do I need to use to fulfill these needs(Batch, JS .. ) ?
I have knowledge only of java, and basic html,c,c++ ... so if I can get basic tutorials I would be grateful indeed.
I have bits of ideas of how this is possible - through IDs of various field on the page which I can access to edit their values, so I just need language specific tutorials/suggestions.
Batch would be preferable if possible, because i need to execute the script through a java swing program.
P.S : If this is of any relevance, only browser acceptable is IE
dont think its possible through Batch,
I think easiest would be javaScript for this task. (chill js is pretty easy)
You can write a simple javaScript to fill in form
You should find how to fill form through javaScript helpful
Then you can use ScriptEngineManager to execute javaScript from your java code.
This tutorial should be helpful :execute javascript from java
You can't fill HTML-fields with a Batch-File. The easiest way is to use Javascript an Greasemonkey in Mozilla Firefox. You can find Tutorials here.
An other way to send data to an WebServer is to use in C/C++/Java Sockets and the HTML-Protocol.

How can I program a button on an Access form to link to a browser window that looks up multiple addresses on Google Maps?

My problem is very similar to the one posted here:
http://www.utteraccess.com/forum/Plotting-Addresses-Maps-t1968130.html
except that thread never found any solutions. Basically, I'm working on an Access form that has a datasheet as a subform. Upon clicking a button on the main form I'm trying to make it so that a browser window opens up and, using the address columns from the spreadsheet data in the subform, plot all the address markers listed. I've looked up a lot of ways to attempt this but I've yet to find a way that seems to work.
I'm not even sure if it's possible to plot multiple markers on Google Maps, but according to research (and after trying it myself) it seems like it isn't, although I don't want to rule it out entirely because I'm still not 100% sure. However I know both Google Earth and batchgeo.com do allow this. I still want to try and do this on Google Maps, but if that doesn't work I want to try to do it using batchgeo.com and if that still doesn't work, then Google Earth (I don't want to make the user download external software if possible).
If it helps, from what I've read API's seem like a useful tool, though I'm not sure how to apply it to an Access form, it seems more like a way to embed to already existing websites.
I'd really appreciate if someone could help me figure out how to approach this problem!
Maybe this would help?
http://ramblings.mcpher.com/Home/excelquirks/getmaps/mapmarkers
It is Excel but should be translatable.
Here is another example, this time using Access:
http://www.utteraccess.com/forum/Google-Maps-Multiple-Mar-t1973499.html
...from what I've read API's seem like a useful tool, though I'm not
sure how to apply it to an Access form, it seems more like a way to
embed to already existing websites.
You're right. There's no way, that I'm aware of, to embed a Google Maps object in a form (like an ActiveX control). Microsoft MapPoint is a software product that lets you do Map integration by way of an ActiveX control (no need to use HTML and/or javascript).
What I usually do on a project like you're working on is I get my HTML page working the way I want it to, outside and independent of MS Access. You should be able to program and test the HTML file locally without having to use an actual web server. Just use something like NotePad++ or Sublime Text Editor 2 to write your HTML and Javascript and then open the file in your browser to see if it works. I'm quite sure you'll need to use Javascript in your HTML page to make this work. That's what the Google Maps API is all about.
After you have your webpage working, then you will have to go into Access and write code to create that web page on the fly with the address data for the current data set. You can just write it out to the Windows Temp folder and then open your browser control that that web page.
Julian Knight's answer links to more specifics on how to create the HTML page on the fly. It looks like gobble-de-gook, mostly because it is. Outputting HTML/Javascript/CSS from VBA is far less than optimal. This is why you troubleshoot it outside of Access, as much as you can.