My rough guess is that the problem is not on that line but actually on the line where you're opening the file. "Excel.workbook" is undefined which means there was a problem opening the workbook.
What is the value of the excel path?
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.