Reputation: 107
I have a simple function on context menu option clicked which gets passed the active cell address, eg: F81
, from the user and inserts a row below.
export const insertRowBelow = async (address) => {
await Excel.run(async (context) => {
const worksheet = context.workbook.worksheets.getActiveWorksheet();
const insertRowRange = worksheet.getRange(getNextRowRange_num(address));
insertRowRange.insert();
return await context.sync();
}).catch((error) => {
console.error(error.stack);
});
};
However, when the line insertRowRange.insert()
is run the client viewport jumps to the top of the sheet into position A1. The active cell is unchanged as when user clicks the Down
key it takes the user back to original position.
This was working fine until recently, and now all users are experiencing this issue.
This leads me to believe its something to do with Excel? Does anyone have any info on how to fix this please? Many thanks.
Upvotes: 0
Views: 14