Commit 57b4d7d9 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add

Set sheet name, setFontColor, setFontSize, setFontName in builder
parent 5d105d50
......@@ -33,6 +33,15 @@
return new ApiWorksheet(this.wbModel.getWorksheet(this.wbModel.getActive()));
};
/**
* Set sheet name
* @memberof ApiWorksheet
* @param {string} name
*/
ApiWorksheet.prototype.setName = function(name) {
this.worksheet.setName(name);
};
/**
* Returns an object that represents the range
* @memberof ApiWorksheet
......@@ -62,13 +71,43 @@
this.range.setValue(val);
};
/**
* Set text color in the rgb format.
* @param {byte} r
* @param {byte} g
* @param {byte} b
*/
ApiRange.prototype.setFontColor = function(r, g, b) {
this.range.setFontcolor(new AscCommonExcel.RgbColor((r << 16) + (g << 8) + b));
};
/**
* Set font size
* @param {number} size
*/
ApiRange.prototype.setFontSize = function(size) {
this.range.setFontsize(size);
};
/**
* Set font name
* @param {number} name
*/
ApiRange.prototype.setFontName = function(name) {
this.range.setFontname(name);
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Export
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Api.prototype["GetActiveSheet"] = Api.prototype.GetActiveSheet;
ApiWorksheet.prototype["setName"] = ApiWorksheet.prototype.setName;
ApiWorksheet.prototype["getRange"] = ApiWorksheet.prototype.getRange;
ApiWorksheet.prototype["setColumnWidth"] = ApiWorksheet.prototype.setColumnWidth;
ApiRange.prototype["setValue"] = ApiRange.prototype.setValue;
ApiRange.prototype["setFontColor"] = ApiRange.prototype.setFontColor;
ApiRange.prototype["setFontSize"] = ApiRange.prototype.setFontSize;
ApiRange.prototype["setFontName"] = ApiRange.prototype.setFontName;
}(window, null));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment