Professional Documents
Culture Documents
Sheets Data Collection Instructions
Sheets Data Collection Instructions
Contents
● Summary of Task
● Attempter Workflow
● Reviewer Workflow
● Examples of Good Tasks
● Collection Rules
Summary of Task
The purpose of this project is to collect data on how people use Google Sheets (“Sheets” for short), a
software tool used to create and edit spreadsheets. For each task, you will be given a link to a spreadsheet in
Sheets that has pre-populated data (this is called an “Initial State”). You will be asked to make a copy of the
sheet and then complete a series of specific commands (each command is called an “action”) to edit and
modify the initial state. To complete each task, you will need to record each action using a special built-in
Sheets feature called “Macros” and then paste the macro script into the corresponding text field in the task.
action Examples
1. “Create a new column called profit that’s revenue minus cost”
2. “Add a total row that sums each column A-E”
3. “Add commas to all numbers”
4. “Make a pivot table showing sales by SKU”
Macro Example
function action1() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('E10').activate();
};
Attempter Workflow
The following instructions are only for Attempters. Reviewers should go directly to the Reviewer Instructions
below.
Step Example
Step 1
Click the spreadsheet link in the
Initial State section of the task.
Step 2 Video
Click File > Make a copy, and then
click the Make a copy button on the
“Copy document” popup
Complete Each Action
How to complete each action: Video Overview
In the new sheet you created, record a macro for EACH action below in the order that they are listed. The
process is as follows:
Reviewer Workflow
These instructions are only for Reviewers. Attempters should see the instructions above.
Step Example
Step 1
Click the spreadsheet link in the
Initial State section of the task.
Step 2 Video
Click File > Make a copy, and then
click the Make a copy button on the
“Copy document” popup
Step 2: Copy the code from the action1 field in the Remotasks interface and paste it into macros.gs in the
Apps Script tab in a new row under the initial state script. Click Save, then select the function for the macro
you created in Apps Script and click Run to execute it. You will have to provide authorization for the script to
run.
Step 3: Check the spreadsheet to see if the action was successfully executed after running the macro. If so,
the action was done correctly. Record a macro that captures you successfully executing the action. From
there, you will need to fix the task by deleting the macro that was entered and pasting the correct one.
Step 4: Repeat steps 2-3 for each subsequent action in the task.
Step 5: Once all of the macros for each action are correct, approve/submit the task.
action Macro
spreadsheet.getActiveSheet().autoResizeColumns(1
, 4);
spreadsheet.setActiveSheet(spreadsheet.getSheetB
yName('Sheet1'), true);
};
spreadsheet.getActiveRangeList().setHorizontalAlig
nment('right');
};
action5 function action5() {
Delete all empty rows. var spreadsheet = SpreadsheetApp.getActive();
var sheet = spreadsheet.getActiveSheet();
sheet.getRange(1, 1, sheet.getMaxRows(),
sheet.getMaxColumns()).activate();
sheet = spreadsheet.getActiveSheet();
sheet.getRange(1, 1, sheet.getMaxRows(),
sheet.getMaxColumns()).createFilter();
spreadsheet.getRange('A1').activate();
var criteria = SpreadsheetApp.newFilterCriteria()
.setHiddenValues(['A', 'AA', 'BBB'])
.build();
spreadsheet.getActiveSheet().getFilter().setColumn
FilterCriteria(1, criteria);
spreadsheet.getRange('9:1003').activate();
spreadsheet.getActiveSheet().deleteRows(spreadsh
eet.getActiveRange().getRow(),
spreadsheet.getActiveRange().getNumRows());
spreadsheet.getRange('A1').activate();
criteria = SpreadsheetApp.newFilterCriteria()
.build();
spreadsheet.getActiveSheet().getFilter().setColumn
FilterCriteria(1, criteria);
};
Collection Rules
Macro Names Save each macro with a name in the action1, action2, action3, etc.
actionN format (for the appropriate value
of n).
Rename new tabs Each new tab that you add to an initial You create a pivot table showing
state needs to be renamed to something total sales by employee in a new
that describes what is on the sheet. sheet and the sheet is
automatically named “Sheet2”.
Change the name to something
like “Sales by Employee”