diff --git a/lib/msoffice.js b/lib/msoffice.js index 6aee4bc..3ab9a3b 100644 --- a/lib/msoffice.js +++ b/lib/msoffice.js @@ -159,11 +159,11 @@ function Excel() { } }; - this.getValueByCell = function(row, col) { + this.getValueByPosition = function(row, col) { return this.CurrentWorksheet.Cells(row, col).Value; }; - this.setValueByCell = function(row, col, value) { + this.setValueByPosition = function(row, col, value) { return this.CurrentWorksheet.Cells(row, col).Value = value; }; }; @@ -185,7 +185,7 @@ exports.Excel = Excel; exports.PowerPoint = PowerPoint; exports.Word = Word; -exports.VERSIONINFO = "Microsoft Office interface (msoffice.js) version 0.1.1"; +exports.VERSIONINFO = "Microsoft Office interface (msoffice.js) version 0.1.2"; exports.AUTHOR = "abuse@catswords.net"; exports.global = global; exports.require = global.require; diff --git a/officetest.js b/officetest.js index ee99625..935022b 100644 --- a/officetest.js +++ b/officetest.js @@ -4,9 +4,9 @@ function main(args) { var excel = new Office.Excel(); excel.open(); - - excel.setValueByCell(1, 1, "hello world"); - + + excel.getValueByPosition(1, 1, "hello world"); + excel.close(); }