// Declare the variables var Excel, Book;
// Create the Excel application object. Excel = new ActiveXObject("Excel.Application");
// Make Excel visible. Excel.Visible = true;
// Create a new work book. Book = Excel.Workbooks.Add()
// Place some text in the first cell of the sheet. Book.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
// Save the sheet. Book.SaveAs("C:\\TEST.XLS");
// Close Excel with the Quit method on the Application object. Excel.Application.Quit();
posted on 2011-09-28 14:22  易尔购  阅读(1414)  评论(0编辑  收藏  举报