poniedziałek, 1 kwietnia 2013

Google Apps Script - and why do I need it?

The last time I needed a single spreadsheet (changing over time) from time to time to generate the statistics in the second sheet. Because of that, not only was about the cyclical generation, but the analysis was important for me that they are wrought in colors, bold - just easy to read. I would add that that these sheets are holding in Google Drive.

I was able to rely on macros in MS Word, but I do not know them and do not hurry me to their knowledge. I thought it perfect for me in this situation would be JavaScript and intuition did not fail me. It turned out that the Google Cloud can access Google Apps Script, which written in help Google Apps Script is based upon JavaScript. Thus after a few moments I had the first version of my statistics, and the next sprint final release.
And now a simple example that will bring the possibility of this tool.

Start by creating a spreadsheet with the objective to calculate the profit from the sale of shares:


Sheet ready, so here we go: Tools->Script Editor, we create the project, then the file with the script and finally write in Google Apps Script. We will do three things: calculate the profit for each stock, we will give the background color and bold the font. Run the script and get the result:


Because the sheet and the script is in a cloud, it can be shared with others.

Brak komentarzy: