I am currently working on extracting information from a Google Sheet to create a list of (4X1) arrays.
A B C D E F G H I J
Project | Per1 | W1 | Team1 | Per2 | W2 | Team2 | Per3 | W3 | Team3|
—————————————————————————————————————————————————————————————————————
p1 | Bill | .5 | Tech | Alice| 1 | Other | | | |
p2 |Larry | 1 | Tech | Bill | 1 | Other | Tina | 1 | Other|
p3 | Joe | 2 | Tech | Beth | 1 | Tech | | | |
p4 |Kathy | .5 | Tech | | | | | | |
p5 | Bill | 1 | Tech | Larry| 1 | Other | | | |
*Due to constraints, I am unable to post images at the moment.
Currently, my script allows me to generate a list of (3x1) arrays:
function arrayOfObjects() {
var ss=SpreadsheetApp.getActive();
var sh=ss.getSheetByName('Sheet1');
var vA=sh.getRange("B2:D6").getValues();
Logger.log(vA);
}
The current results are as follows:
[[Bill, 0.5, Tech], [Larry, 1.0, Other], [Joe, 2.0, Tech], [Kathy, 0.5, Other], [Alice, 1.0, Tech]]
However, this only covers the range B2:D6
I am looking to establish links between names and projects (p1,p2,... for further analysis). I aim for the final output to be in the form of (4X1) arrays:
[[p1,Bill,.5,Tech], [p1,Alice,1,Other],[p2,Larry,1,Other],[p2,Bill,.5,Other],
[p2,Tina,1,Other]........[p5,Larry,1,Other]]
Eventually, I want to present the data in table format:
A B
| Name | Number Of project|
———————————————————————————
| Bill | 3 |
|Larry | 2 |
| Joe | 1 |
|Kathy | 1 |
| Alice| 1 |
etc...