diff --git a/lib/spreadsheet.js b/lib/spreadsheet.js index 7055e51..39d774d 100644 --- a/lib/spreadsheet.js +++ b/lib/spreadsheet.js @@ -503,13 +503,21 @@ Spreadsheet.prototype.receive = function(options, callback) { _.each(entries, function(entry) { var cell = entry['gs:cell'], r = cell.row, - c = cell.col; + c = cell.col, + cellContent = (entry.content != undefined) ? entry.content : ''; if (!rows[r]) { info.totalRows++; rows[r] = {}; } - - rows[r][c] = util.gcell2cell(cell, options.getValues, _this.opts.useCellTextValues); + + rows[r][c] = cellContent != '' ? cellContent : util.gcell2cell(cell, options.getValues, _this.opts.useCellTextValues); + + //console.log('test: ' + rows[r][c].toString()); + + if (rows[r][c].toString().charAt(0) == '=') { + rows[r][c] = 0; + } + info.lastRow = util.num(r); });