Please refer to this example
https://paramquery.com/pro/demos/import-xlsxSelect multiple rows, choose context menu -> Border -> All selection edges.
you may have to adapt this source code for your requirement.
action: function () {
var grid = this,
color = $(".border", grid.toolbar()).spectrum('option', 'color');
grid.Selection().address().forEach(function (addr) {
var r1 = addr.r1, c1 = addr.c1, r2 = addr.r2, c2 = addr.c2,
obj = {
left: grid.Range({ r1: r1, r2: r2, c1: c1, c2: c1 }),
top: grid.Range({ r1: r1, r2: r1, c1: c1, c2: c2 }),
right: grid.Range({ r1: r1, r2: r2, c1: c2, c2: c2 }),
bottom: grid.Range({ r1: r2, r2: r2, c1: c1, c2: c2 })
};
for (var key in obj) {
obj[key].toggleStyle("border-" + key, ["1px solid " + color, ""])
}
});
}
Please let me know if you need further assistance.