Copy Data from First Colum from Active Cell Row
Hi, I am just wondering if someone could please assist me in getting a script working for me as I’ve got a script to insert a new line/row to where the selected cell is and insert shift direction down.
I’m having issues trying to work out how to copy the first column cell example A5 in the screenshot that I have highlighted in green to be copied to the new line/row that is the white empty cell (5) above the highlighted.
Your help will be much appreciated.
My script.
function main(workbook: ExcelScript.Workbook) {
let selectedCell = workbook.getActiveCell();
let selectedSheet = workbook.getActiveWorksheet();
// Inverts a row above the selected cell, or where the curser is.
selectedCell.getEntireRow().insert(ExcelScript.InsertShiftDirection.down);
}
Hi, I am just wondering if someone could please assist me in getting a script working for me as I’ve got a script to insert a new line/row to where the selected cell is and insert shift direction down.I’m having issues trying to work out how to copy the first column cell example A5 in the screenshot that I have highlighted in green to be copied to the new line/row that is the white empty cell (5) above the highlighted.Your help will be much appreciated. My script. function main(workbook: ExcelScript.Workbook) {
let selectedCell = workbook.getActiveCell();
let selectedSheet = workbook.getActiveWorksheet();
// Inverts a row above the selected cell, or where the curser is.
selectedCell.getEntireRow().insert(ExcelScript.InsertShiftDirection.down);
} Read More