From abe983bc13c720b145350cb9b0e2c0be4a663bc2 Mon Sep 17 00:00:00 2001 From: Matheus martins Date: Tue, 23 Aug 2016 01:29:11 -0300 Subject: [PATCH] refactoring --- src/SheetTemplater.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SheetTemplater.js b/src/SheetTemplater.js index 439855f..0056a0c 100644 --- a/src/SheetTemplater.js +++ b/src/SheetTemplater.js @@ -187,15 +187,6 @@ var SheetTemplater = function (DriveApp, SpreadsheetApp, newConfig) { properties.json[entityName] = undefined; }; - function replaceValue(properties) { - var row = properties.i + 1, - col = properties.j + 1, - command = properties.values[properties.i][properties.j], - sheet = properties.sheet, - json = properties.json; - sheet.getRange(row, col).setValue(getValueOnJson(json, command.substring(2, command.length - 1))); - }; - function setCellProperties(sheet, cellProperties) { var range = sheet.getRange(cellProperties.row, cellProperties.col); range.setValue(cellProperties.value || ''); @@ -248,6 +239,15 @@ var SheetTemplater = function (DriveApp, SpreadsheetApp, newConfig) { sheet.getRange(row, col).setFormula('=' + getValueOnJson(json, command.substring(2, command.length - 1))); }; + function replaceValue(properties) { + var row = properties.i + 1, + col = properties.j + 1, + command = properties.values[properties.i][properties.j], + sheet = properties.sheet, + json = properties.json; + sheet.getRange(row, col).setValue(getValueOnJson(json, command.substring(2, command.length - 1))); + }; + var processCell = function (properties) { var cellValue = properties.values[properties.i][properties.j]; var annotationFunction = getAnnotationType(cellValue)(properties);