ActiveX can have some odd behavior. You need to make sure that you set all references to the ActiveX object (and sub-objects/members) to null. In your code, you have set w = null, but you still have references to objWorksheet1, name, objWorksheet2, surname. Set those to null too. I would recommend a try/catch/finally block where you null those in the finally block.
There is a good article on CodeProject that recommends: Save, Close, Quit, null. Still, that won't matter unless you have nulled all references to the ActiveX objects & its members.
Sections 12 and 13 of this article have some good examples: http://www.codeproject.com/Articles/404688/Word-Excel-ActiveX-Controls-in-ASP-NET