how to get all work sheet names and cell details

Cooke, Scipio UK/LPL 0 Reputation points
2024-04-22T11:20:07.47+00:00

Hello, i have the existing script in my workbook:
I would like to get all the worksheet names (instead of specifying as ive done), and include it in the batch details output. Thank you


function main(workbook: ExcelScript.Workbook) {
  const ws = workbook.getWorksheet('Sheet1')

  const starttime = ws.getRange('D95').getValue()
  const endtime = ws.getRange('E95').getValue()



  const batchDetails = {
    start: starttime,
    end: endtime
  }
  return batchDetails

}


Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,476 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
871 questions
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,508 questions
0 comments No comments
{count} votes