Hi Majid,
Your requirement can be achievable by
using the getActiveSheet method, activeCell and selectedRange
property. The activeCell property returns the current sheet active cell and selectedRange
property returns the range of selected cells in active sheet as shown below.
Code Block:
function contextMenuItemSelect(args) {
let sheet = spreadsheet.getActiveSheet();
console.log(sheet.activeCell); // active cell
console.log(sheet.selectedRange); // returns the selected range
}
|
For your convenience we have
prepared the sample based on our suggestion. Please find the link below.
Sample Link: https://stackblitz.com/edit/react-mcbnsq?file=index.js