Excel宏:批量转化当前文件夹所有CSV2XLSX
程序员文章站
2022-05-16 09:29:12
...
Sub csv2xlsx()
On Error Resume Next
Application.ScreenUpdating = False
fPath = ThisWorkbook.Path & "\"
fName = Dir(fPath & "*.csv")
Do While Len(fName)
With Workbooks.Open(fPath & fName, ReadOnly:=True)
.SaveAs fPath & Replace(fName, ".csv", ".xlsx"), IIf(Application.Version >= 12, xlWorkbookDefault, xlWorkbookNormal)
.Close
End With
fName = Dir
Loop
End Sub
上一篇: vuei18n国际化使用 3步走快速上手
下一篇: vba 获得本机的ip address