var array = new Array("aichi", ...); var fs = new ActiveXObject("Scripting.FileSystemObject"); var xl = new ActiveXObject("Excel.Application"); xl.DisplayAlerts = false; for (var i = 0; i < array.length; ++i) { var filename = fs.GetAbsolutePathName(array[i]+".html"); var savefile = fs.GetAbsolutePathName(array[i]+".csv"); var wbook = xl.Workbooks.Open(filename); wbook.SaveAs(savefile, 6); wbook.Close(); } xl.Quit();