Build script (.gs) for google spreadsheets.

Cancelled Posted Jul 9, 2015 Paid on delivery
Cancelled Paid on delivery

There is a google spreadsheet:

[url removed, login to view]

The script is needed that fill 'recompute' table using initial values from 'init' table and values from sheets created by template.

Next algorithm could be used:

1) Function is inserted in the first cell of the recompute table and fills all of the range in table,

2) Number of the accounts could be changed, if it's possibe script could count number of accounts by iterating from current cell down to bottom of the page and stop counting when find a cell with some data. In example it will be at B15. Or constant could be created that will be reassigned when change number of accounts,

3) Each cell from range (in the example the range is B5: D14) fills by rules:

a) Initial value — for cell B5 it's G5, for С8 it's I8 etc.

b) plus all operations from sheets that starts from date that contains in H1 cell. Function that iterates over all necessary sheets is in the bottom of this description,

c) Each row from each sheet is added to appropriate cell according to right currency and right account.

As a result of the script I will have recomputed accounts that contains initial values and all operation from provided date.

// This code could be used to iterate over all necessary sheets.

// var sheets = [url removed, login to view] ().getSheets ();

// var sum = 0;

// var re = /.+\s[0–9]{4}$/

// var regExp = new RegExp (re);

// for (var i = 0; i < [url removed, login to view]; i++) {

// var sheet = sheets[i];

// if ([url removed, login to view] ().match (regExp)) {

// ......

// }

Google App Engine JavaScript

Project ID: #8035314

About the project

Remote project Active Jul 9, 2015