How to save an excel file with Read-only

You could try this…

  1. Add an Invoke Code activity
  2. Add an argument to the Invoke Code activity called ‘filepath’
  3. Add the below script to the code parameter
  4. Pass the filepath of your saved Excel file to the filepath argument.

Script:
System.IO.File.SetAttributes(filePath, System.IO.File.GetAttributes(filePath) Or FileAttributes.ReadOnly)

Example:

2 Likes