title: Changing Excel data with JavaScript
body: <p>I am working on a tool where I control a Excel sheet using JavaScript. </p>
  
  <p>Here is a requirement that, I need to change the Excel cell data. 
  I was doing something like this:</p>
  
  <p><strong>1. Open Excel as:</strong></p>
  
  <pre><code>excel = new ActiveXObject("Excel.Application");
  
  excel.Visible = false;
  excel.DisplayAlerts = false;
  
  workBook = excel.WorkBooks.open("c:\\excel.xls");
  
  workSheet = workBook.Worksheets("Work_sheet_1");
  </code></pre>
  
  <p><strong>2. Make change as:</strong></p>
  
  <pre><code>WorkSheet.Cells(10,20).value = "10";
  console.log("Value stored in excel is: "+WorkSheet.Cells(10,20).value);
  </code></pre>
  
  <p><strong>3. Close as:</strong></p>
  
  <pre><code>excelWorkbook.save(); 
  excelWorkbook.Close(true, "c:\\excel.xls").    
  workBook.Close(false);
      excel.application.quit();
      excel = null;
  </code></pre>
  
  <p>I run it in browser, and I get log as:</p>
  
  <pre><code>Value stored in excel is: 10
  </code></pre>
  
  <p>Now whenever I make any change in Excel through JavaScript, I can always see the correct log report, But in excel, this changes are either <strong>saved at a delayed of 2 - 3 min</strong>, or <strong>never saves any change</strong>. this seems a kind of weird. Over that, when try to open the excel sheet manually from folder, it gives <strong>Edit-mode Lock Pop-up</strong>. </p>
  
  <p>Can anyone tell me where am I heading wrong?</p>