Sorry if this is the wrong forum I got redirected to post my question on Scripts here by the Excel team
I have a large number of files for individual clients that periodically need to be updated with the same new content. I am trying to create a script which loops through and opens each file within a specific folder and copies the content from a masterfile into each file held in the folder.
The files are saved in a sharepoint folder.
I am getting the following error
See line 8, column 7: Office Scripts cannot infer the data type of this variable. Please declare a type for the variable.
This is the line of code I have used
let folder: ExcelScript.DirectoryObject = workbook.getDirectoryObjectFromUrl(folderUrl);