Black_Lung
Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору const xlCSV = 6 const xlTextMSDOS = 21 const xlWorkbookNormal = -4143 const wdFormatRTF = 6 const wdFormatDocument = 0 const wdFormatText = 2 const wdFormatDOSText = 4 Set fso = CreateObject("Scripting.FileSystemObject") folder = WScript.Arguments.UnNamed.Item(0) Set f = fso.GetFolder(folder) Set fc = f.Files Set ExcelApp = CreateObject("Excel.Application") ExcelApp.DisplayAlerts = False For each fl in fc fext=fso.GetExtensionName(fl) if fext="csv" then fname=left(fl.name,len(fl.name)-4) wscript.echo fname ExcelApp.WorkBooks.Open fl ExcelApp.ActiveWorkbook.SaveAs folder&fname&".xls", xlWorkbookNormal end if next ExcelApp.Quit | Всего записей: 275 | Зарегистр. 09-10-2008 | Отправлено: 11:48 15-05-2012 | Исправлено: Black_Lung, 12:48 15-05-2012 |
|