title: how to set the time interval in javascript
body: <p>I am using html5 and javascript..i have some code in which i am reading some value from excel file ..here is the code</p>
  
  <pre><code> var xVal = 1;
   var yVal = 2
  
   function readdata(x,y) {
      x = xVal;
      y = yVal;
      try {
         var excel = new ActiveXObject("Excel.Application");
         excel.Visible = false;
         var excel_file = excel.Workbooks.Open("D:\\Test.xls");
         //alert(excel_file.worksheets.count);
         var excel_sheet = excel_file.Worksheets("Sheet1");
  
     for(i=0;i&lt;5;i++)
     {
          var data = excel_sheet.Cells(i,2).Value;
          drawWithexcelValue(data);
         }        
  }
  catch (ex) {
      alert(ex);
  }         
  </code></pre>
  
  <p>this is my code to read excel file ...while i am running it gives  an error Expected";"..i dont know where do i keep the ;</p>
  
  <p>We have for loop to evaluate next value ...i want to know that how to give time interval between every execution , say it will stop for particular time before taking next value..and secondly 
  i am hardcoding the value i&lt;5; ..i want to know that is there any function through which i can read full excel file ...</p>