Scripting and Macros


Function Scanning

function main(workbook: ExcelScript.Workbook) { 
   const FUNCTION_NAME: string = "Sum";
   const TOP_LEVEL_ONLY: boolean = false;
   const ts = new Date();
   const resultSheetName: string = "Results";
   const resultSheet: ExcelScript.Worksheet = workbook.addWorksheet(resultSheetName);

   resultSheet.getRange("A1:D1").setValues([["Sheet","Address","Formulas","Top Level"]]);

   let output: (string | boolean)[][] = [];

   const escapedName: string =
   const boundary: RegExp =
   const boundaryLoose: RegEx =

   function isTopLevelCall(
      formula: string,
      fn: string) :
      boolean {

      let f: string = formula.trim();
      if (f.startsWith("=")) = f.slice(1).trim();
      return top === fn.ToUpperCase();
   }

   for (const ws of workbook.getWorksheets()) {

   }

   if (output.length) {

   } else {
      resultSheet.getRange("A2").setValue("No formulas were found.")
   }

   resultSheet.activate();
}


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext