Update msoffice.js

This commit is contained in:
Namhyeon Go 2023-12-11 18:09:53 +09:00 committed by GitHub
parent 00f92f0eb9
commit 3fbb73e3e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,23 +175,24 @@ function Excel() {
return this; return this;
}; };
this.setRange = function(range) { this.getRange = function(range) {
this.range = range; return new Excel.Range(this.currentWorksheet.Range(range));
return this;
}; };
this.getCellByPosition = function(row, col) { this.getCell = function(row, col) {
if (this.range == null) { return new Excel.Cell(this.currentWorksheet.Cells(row, col));
return new Excel.Cell(this.currentWorksheet.Cells(row, col));
} else {
return new Excel.Cell(this.currentWorksheet.Range(this.range).Cells(row, col));
}
}; };
}; };
Excel.SupportedFileTypes = FileTypes.Excel; Excel.SupportedFileTypes = FileTypes.Excel;
Excel.Range = function(range) {
this.range = range;
this.getCell = function(row, col) {
return new Excel.Cell(this.range.Cells(row, col));
};
};
Excel.Cell = function(cell) { Excel.Cell = function(cell) {
this.cell = cell; this.cell = cell;
// EXAMPLE: excel.getCellByPosition(1, 3).setValue("Hello world!"); // EXAMPLE: excel.getCell(1, 3).setValue("Hello world!");
this.setValue = function(value) { this.setValue = function(value) {
this.cell.Value = value; this.cell.Value = value;
}; };
@ -226,7 +227,7 @@ exports.Excel = Excel;
exports.PowerPoint = PowerPoint; exports.PowerPoint = PowerPoint;
exports.Word = Word; exports.Word = Word;
exports.VERSIONINFO = "Microsoft Office interface (msoffice.js) version 0.1.6"; exports.VERSIONINFO = "Microsoft Office interface (msoffice.js) version 0.1.7";
exports.AUTHOR = "abuse@catswords.net"; exports.AUTHOR = "abuse@catswords.net";
exports.global = global; exports.global = global;
exports.require = global.require; exports.require = global.require;