OfficeScripts

  • All Post
  • .NET
  • All
  • Apps Script
  • Java
  • OfficeScripts
  • Others
  • Python
  • SQL
  • VBA

May 10, 2023/

Here’s an example of an OfficeScript that creates a new workbook in Excel: function main(workbook: ExcelScript.Workbook) { // Create a new workbook let newWorkbook = ExcelScript.Workbook.createEmpty(); // Save the new workbook newWorkbook.saveAs("NewWorkbook.xlsx"); // Close the new workbook newWorkbook.close(); } To use this OfficeScript, follow these…

May 2, 2023/

Here is an example of Office Script code that writes data to Microsoft Excel in OneDrive: function main(workbook: ExcelScript.Workbook) { // Get the active worksheet let sheet = workbook.getActiveWorksheet(); // Write data to the worksheet sheet.getRange("A1").setValue("Name"); sheet.getRange("B1").setValue("Age"); sheet.getRange("A2").setValue("John"); sheet.getRange("B2").setValue(30); sheet.getRange("A3").setValue("Mary"); sheet.getRange("B3").setValue(25); // Save the workbook…

Load More

End of Content.

Pamai Tech
Turning ideas into Reality

Products

Office Add-in

Enterprise Solutions

Cloud Consulting

UI UX Design

Data Transformation

Services

FAQ's

Privacy Policy

Terms & Condition

Team

Contact Us

Company

About Us

Services

Features

Our Pricing

Latest News

© 2025 Pamai Tech