in reply to Opening Excel sheet through getcwd

Please don't comment out use strict

Please post the actual code that you run, then one you've shown us will die with a different error (where does getcwd come from?).

Also it doesn't make sense to comment out the first line of a three-line statement, and expect it to work.