Looking to make spreadsheet into applet, widget, or API - html

I have two similar but different projects. Both I would like to take something I created as an excel spreadsheet and make into something I can embed in a website. I am mostly asking what language would be best, any resources for learning how that language, or any insights. I will post the exact nature of the projects below just in case there is any relevance.
Thanks!
For the first project, I have a spreadsheet where a I can insert values into A1 and A2 and get a result in A3. This is based on many formulas. I would like to make this into something I can put online so the user can only see three values and not the formulas.
For the second project I have a large spread sheet that is 1000x1000. Each row and column corresponds to a name. Right now once again I can put a name in A1 a name in A2 and get the value in A3. I would like to make this into something I can put online.

Option 1: Javascript (the calculations are done on the client)
Option 2: PHP (the calculations are done on a web server)
both are free and you can find plenty of resources you can start with http://www.w3schools.com/

Are you looking to have it actually be functional, or are you interested in posting just the results?
If you want functionality then for the first project a simple javascript will suffice (learn jquery - a wrapper that makes javascript easier)
For 1000x1000 you're gonna have to explain exactly what the functionality is that you're looking for.
Edit: Google Docs supports some sorts of widget/gadget deal. Learn that, and use Google spreadsheet to do your math for you.

Related

Add one year to existing Google sheet strings

I have a google sheet that I use to keep track of my income/spends within my (one-man) company. One could argue that google sheets isn't the best tool for that, but it works best for me considering a number of reasons.
The only real problem is when I prepare the document for a new year. I have a lot of formulas calculating all sorts of things, and usually I just change the year for each and every one manually. But I'm wondering if there is a easier way to to this, some kind of "add one year to all dates in this sheet"-script.
The formulas aren't pure dates, but with a lot of other information in them as well. I post an example of how they could look below.
I don't know much about coding, so perhaps this is impossible due to whatever obvious reasons for you programmers, but I thought I might as well ask since I rather not spend my Christmas updating all million dates by hand (exaggerating but you get it!).
How do I change the following formula to be year-independent?
=(SUMIFS('Händelser'!$I$4:$I$101;'Händelser'!$K$4:$K$101;">=200101";'Händelser'!$K$4:$K$101;"<=200131")+$D$6)-(SUMIFS('Händelser'!$Q$4:$Q$101;'Händelser'!$S$4:$S$101;">=200101";'Händelser'!$S$4:$S$101;"<=200131")+$D$7)
Another example of formula:
=(SUMIFS('Händelser'!$G:$G;'Händelser'!$E:$E;">=200201";'Händelser'!$E:$E;"<=200231"))/20
Thanks!
Never mind, I just realised one could "search and replace" in google sheet, and have it search not only through the text written out but also through the formulas behind it. I just searched and replaced "=20" with "=21" and it all worked out nicely.
Have a nice day!

Google Forms - Take (Long) Existing Form and Add Answer-Based Page Navigation Using Script

I used scripting to create a Google Form with 200 + pages (generally only one question per page, though) and now need to add the branching logic to it. By the way, the new Forms gets really slow with this many pages.
Anyone know if I can use (Google) Sheets together with Forms and a script to create answer-based branching logic? I would envision Column A would be the question numbers and columns B-n would be used to point to question numbers based upon the answer. If needed, I could repeat the answer value in this exercise.
Assuming setChoices along with item.createChoice can do this.
Thanks

Is it possible to hide certain questions according to respondent's answer?

For example, if I have the following format:
Question 1: (multiple choices)
A
B
Question 2:
A1
A2
Question 3:
B1
B2
If a respondent chooses A for the first question, then is it possible to hide Question 3 completely to avoid confusion? I understand that I can simply create a new page for different questions but I wish to put everything in one page for simpleness. Is there a script that will help me achieve what I want?
Thanks in advance!
That is not possible. Apps Script can only perform actions that you could perform manually yourself (but would be cumbersome to do). This is a Google Forms limitation.
You could write the whole "form" in Apps Script though, then you'd be able to do anything with the interface. I think there's a couple of published scripts out there that does this already.

How can I summarize the updates to a table on an page I browse?

I am a student at a University. With the placement process going on, we have an internal placement website that shows updates and status about various companies I have applied to. Since the number of companies is too large it becomes cumbersome to scroll through the complete list to find information. Sometimes, I just miss some things. Now, to tackle this problem, here is what I want to do:
The data is in an HTML table. Each row shows information about one company: Some dates, Status(Not/Shortlisted/Applied), Some yes/no options etc. each in a different column. Once I open the page I want to be able to extract information about which companies I got shortlisted in, and in which ones I didn't make it.
What is the right technology to do this ? I am thinking of writing a Greasemonkey user script (I have never actually written any, but how hard could it be ?). What other options do I have?
Edit: I don't quite understand why this question has voted to be closed?
I just displayed a use case for something general: On opening a web page, automatically extracting information from the page and display it to the user. What is the easiest and sufficiently powerful way to achieve this?
Since you can't get access to the website's database, Greasemonkey would be your best automation approach. However, this task is likely to be over before you can get a decent script up from scratch.
Your best practical approach is to save the pages and/or copy and summarize the data in MS Excel, or equivalent.
~~~~~~~~~
Here at SO, We will not develop any but the simplest Greasemonkey scripts for you from scratch (unless they are fun somehow ;) ). But, you can sometimes get such help in the "Script requests forum" at userscripts.org.
In order for someone to help you, they will need:
A clear idea of exactly what data gets manipulated, and how.
Access to the target site. Or access to saved snapshots of the target pages. GM scripts are extremely dependent on the details of the target page.
"other option":
ctrl + F
enter shortlisted
enter
ctrl + G <--repeat last search

What is the best way to display spreadsheet data in Ruby on Rails?

I am looking for a way to edit data and have values dynamically calculated (i.e. totals, averages, etc.) My application is a web based gradebook system for teachers and one of the big challenges is allowing them to enter/update grades. The most natural solution for this type of data is a table or spreadsheet grid and my first thought was to write something myself, but I quickly got over that idea. :)
The chief problem I'm having is being able to calculate things in real time. When a teacher changes a grade I need the table to update that students AVG % and possibly their letter grade. It doesn't have to feed these calculations back to the server (they are just for show) but the cell changes do have to be saved (via AJAX).
I know this should probably be a FAQ and I found these two answers (1, 2) but my requirements are a bit different (I think). First of all I'm looking for something that integrates with RoR fairly well; this means using Prototype. It should also be pretty lightweight and clean; I don't need fancy things like pictures, sub-groups, etc. Lastly, since my project is under the GPL, it must be open source.
Any hints? Right now I'm looking at TableKit & Rico LiveGrid but I'm not sure they can do the row & column calculations that I need.
I think ExtJS has something like this. It'd be worth while checking it out: http://extjs.com/
Saving it in the database might be easiest. Calculate and save the things you need, then update the view.
I'm not sure how your UI works, but you can attach an AJAX event to the UI where they enter the information, saving the data. The controller can respond to javascript, dropping into an RJS template that would update the values you need on the page.
After searching for something lightweight and easy to use I have given up and am writing my own little bits of JavaScript to do my bidding for me. Its not perfect but it seems to work pretty well, and it satisfies my needs (for now).