Applescript - Open password protected excel file
There is a way to open a Excel workbook (xlsx, in my example) which is protected either the workbook and/or the sheet. You can use the following script:

set passwd to "1234" -- whatever you want
set theWbpath to "/Users/xxxxx/Desktop/number1.xlsx" -- example path
set theWb to "number1.xlsx" -- example file
set theSheet to "sheet1" -- example name of sheet
tell application "Microsoft Excel"
    open theWbpath                
    unprotect workbook theWb ¬ --&gt; 
        password passwd        --&gt; workbook part, can be left out
    unprotect sheet theSheet ¬ --&gt; 
        password passwd        --&gt; sheet part, can be left out
end tell