Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
How to copy a column from one worksheet to another using the excel javascript api for an excel addin

Is there a way to copy a column or a range of cells from one worksheet to another? There are ways to copy ranges of cells within the worksheet, but I am looking to copy cells from one worksheet to another.

I am working with the excel javascript api to create an excel addin.

The excel javascript api I am using

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found a solution. This works by passing a range to the copyFrom method.

async function run() {
  await Excel.run(function (context) {
    var currentWorksheet = context.workbook.worksheets.getActiveWorksheet();
    currentWorksheet.load("name");

    var otherSheet = context.workbook.worksheets.add("other-sheet");
    otherSheet.load("name, position");
    var tbACol = currentWorksheet.getRange("A1:A200");
    otherSheet.getRange("A1:A3").copyFrom(tbACol);


    return context.sync().then(function () {
      console.log(`Added worksheet named "${otherSheet.name}" in position ${otherSheet.position}`);
    });
  });
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!