Get value from each cell of a Range.Areas

Maza, Mario 1 Reputation point
2021-09-19T02:44:00.423+00:00

Get value from each cell of a Range.Areas

I am in the process of learning.
I have tried the following, but I would like a more effective suggestion on how to get the values from a RangeAreas and paste them into a table.
Thanks in advance

async function main(mybook: ExcelScript.Workbook)
{

let MyHoja = mybook.getWorksheet("Hoja1");

let RCell = MyHoja.getRanges("D15, D17, D19, D21, I23, O23, A59");

var vRCell = RCell.getAreas();

var i:number=0

let vRCell1 = vRCell.forEach((value, i) => {
let AreaDAT = vRCell[i];

MyHoja.getCell(29, i).setValue(AreaDAT);


i = i + 1;

});

}

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,720 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. jeremy-msft 11 Reputation points Microsoft Employee
    2021-09-23T17:18:06.833+00:00
    0 comments No comments