Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusmr13 committed Aug 23, 2016
1 parent ac7d4b6 commit abe983b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/SheetTemplater.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '');
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit abe983b

Please sign in to comment.