excel.Open(fileName);

It apears that the file stays locked as a result of the excel.Open(fileName) call. How can I unlock it?

Restart WWW service could unlock it.

Which version are you using? In recent versions, this problem is already fixed.