What is this?

The merge script is a simple google script that runs in the context of any google spreadsheet file and performs one basic task: 

  1. merge data from multiple sheets into one

How does it work?

These are the necessary steps to run the script.

  • Open the script (it's a file inside a google drive folder currently called "Custom LabMap Merge")
  • Click on Run in the menu and select "Test as add-on"
  • Then select the spreadsheet in which you want to run the script clicking in "Select Doc", and once it's selected click Save.
  • The file will be listed above, just select it and click Test

Once in the spreadsheet, the script will be found under the add-ons menu.

  1. If you click on Merge sheets a small form will be displayed in the right sidebar. 
  2. All the fields need to be completed to run the script
  3. You need to have all the sheet copied into the spreadsheet in which you will run the script
    1. It can be easily done by clicking in Copy to > Existing spreadsheet on each of the spreadsheets you want to merge

Details on merge script settings


A field range needs to be specified, the script will copy the same field range for all the sheets to be merged.

It's recommended organizing the sheets to have all the common fields in the same range and keep all the uncommon (custom,country-specific) fields out of the range.

The user will be able to select which of the sheets will be merged by selecting them on the list in the form at the right sidebar


This video shows the step by step process to run the script 


Scope and potentiality

This script was initially written by InSTEDD to expedite the process but the code is totally open to any change, any developer or even a google power user can add a few lines to the script and get new functionalities.