Forum Discussion

jaydesai's avatar
jaydesai
New Contributor
3 hours ago

Test complete tool does have rights to open excel file

Trying to run the python code below and log message shows access denied

def ExcelExample():

 excelFile = Excel.Open("C:\\temp\\DataStorageExcel.xlsx")

Notes

1.excel does have password and manually, it can open 

Thank you 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Is the spreadsheet already opened in Excel? I suggest you check your Task Manager to ensure no other Excel processes are opened.

  • jaydesai's avatar
    jaydesai
    New Contributor

    Thank you for the update! 

    did check and no other Excel file is opened

  • Hello,

    I am not sure I understand your message. The error says "removing file" while your statement is open file. If you are attempting to delete an open file, first you need to close it.

    I don't believe TestComplete can open a password protected file, I get a different error. Probably you need third party libraries to decrypt.