Commit 1dbf67f7 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add Merge and UnMerge functions to api builder

parent cf5e40de
...@@ -558,6 +558,30 @@ ...@@ -558,6 +558,30 @@
this.range.setNumFormat(value); this.range.setNumFormat(value);
}; };
/**
* Creates a merged cell from the specified Range.
* @memberof ApiRange
* @param {bool} across
*/
ApiRange.prototype.Merge = function (across) {
if (across) {
var ws = this.range.worksheet;
for (var r = this.range.r1; r <= this.range.r2; ++r) {
ws.getRange3(r, this.range.c1, r, this.range.c2).merge(null);
}
} else {
this.range.merge(null);
}
};
/**
* Separates a merged area into individual cells.
* @memberof ApiRange
*/
ApiRange.prototype.UnMerge = function () {
this.range.unmerge();
};
...@@ -793,6 +817,8 @@ ...@@ -793,6 +817,8 @@
ApiRange.prototype["SetStrikeout"] = ApiRange.prototype.SetStrikeout; ApiRange.prototype["SetStrikeout"] = ApiRange.prototype.SetStrikeout;
ApiRange.prototype["SetFillColor"] = ApiRange.prototype.SetFillColor; ApiRange.prototype["SetFillColor"] = ApiRange.prototype.SetFillColor;
ApiRange.prototype["SetNumberFormat"] = ApiRange.prototype.SetNumberFormat; ApiRange.prototype["SetNumberFormat"] = ApiRange.prototype.SetNumberFormat;
ApiRange.prototype["Merge"] = ApiRange.prototype.Merge;
ApiRange.prototype["UnMerge"] = ApiRange.prototype.UnMerge;
ApiDrawing.prototype["GetClassType"] = ApiDrawing.prototype.GetClassType; ApiDrawing.prototype["GetClassType"] = ApiDrawing.prototype.GetClassType;
......
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