title: Save excel file with current date and time through javascript
body: <p>I want to open the excel file and then save the excel file and the name will be file name + current date and time. I am not getting this result for date I have used <code>Date()</code></p>
  
  <pre><code>var wshell;
  var excel = new ActiveXObject("Excel.Application");
  alert(excel);
  var excel_file = excel.Workbooks.Open("book2.xlsx");
  excel.Visible = true;
  
  var objWorkbook = excel.Workbooks.Add();
  var objWorksheet = objWorkbook.Worksheets(1);
  
  objWorkbook.Worksheets(1).Activate;
  objWorksheet.name = "test";
  objWorksheet.Paste;
  objWorksheet.columns.autofit;
  window.clipboardData.setData("Text","");
  var today = new Date();
  
  document.write(today.toString());
  excel_file.SaveAs("d:\\board.xls"+ (today.toString()));
  alert("data saved");
  </code></pre>