takamoto's Comments

  • Hi, thank you for the tutorial!

    I got one request if it's possible. Can you make a script that shorts the data by column after sending data from Construct to spreadsheet? I'm going to make a leaderboard so it should be sorted descending. I tried to add this code to your script but it didn't work. Can you help?

    /**

    * Automatically sorts the 3rd column (not the header row) Descending.

    */

    function onEdit(event){

    var sheet = event.source.getActiveSheet();

    var editedCell = sheet.getActiveCell();

    var columnToSortBy = 3;

    var tableRange = "B1:E500"; // What to sort.

    if(editedCell.getColumn() == columnToSortBy){

    var range = sheet.getRange(tableRange);

    range.sort( { column : columnToSortBy, ascending: false } );

    }

    }

takamoto's avatar

takamoto

Member since 29 Nov, 2015

Twitter
takamoto has 1 followers

Trophy Case

  • 8-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies