- @echo off
- more +2 "%~0">$.vbs&cscript /NoLogo $.vbs&del $.vbs&goto :eof
- strPath = CreateObject("Scripting.FileSystemObject").GetFolder(".").Path
- Set objExcel = CreateObject("Excel.Application")
- Set objFile = objExcel.Workbooks.Open(strPath & "\a.csv")
- objFile.SaveAs(strPath & "\a.xls"),1
- objFile.Close
复制代码 保存为bat,与a.csv放在同一位置,试试 |