MS的Bug.
这样做
<HTML> 
<BODY> 
<INPUT type="button" value="Automate Excel" name=AutomateExcel onclick="StartExcel()"> 
<SCRIPT LANGUAGE=Javascript> 
 var idTmr = "";  
function StartExcel() { 
var oExcel;     
oExcel = new ActiveXObject("Excel.Application"); 
    oExcel.Quit(); 
    oExcel = null;
    idTmr = window.setInterval("Cleanup();",1);
  }   
function Cleanup() {
    window.clearInterval(idTmr);
    CollectGarbage();
  }
</SCRIPT> 
</BODY> 
</HTML>

解决方案 »

  1.   

    原文参见
    http://support.microsoft.com/default.aspx?scid=KB;en-us;q266088
      

  2.   

    public class Orders

      public int customerId;
      
      /**
       * @jws:control
       */
      private OrderStatusCtrl orderStatus;
      /** @jws:context */ 
      JwsContext context;   /**
       * @jws:operation
       * @jws:conversation phase="start"
       */
      public String login(String userName, String password)
      {
        Customer cust = orderStatus.getCustomerByUserName(
          userName);
        
        if (cust != null)
        {
          if (!cust.password.equals(password))
          {
            customerId = -1;
            context.finishConversation();
            return "Invalid password";
          }
          else
          {
            customerId = cust.customerId;
            return "Login successful";
          }
        }
        else
        {
          customerId = -1;
          context.finishConversation();
          return "Invalid user-id";
        }
      }