【发布时间】:2014-04-16 15:31:48
【问题描述】:
这是我的代码,但由于某种原因,它在 saveas 行上失败(对象不支持等)。
Sub convertToXLS()
Dim wb As Object
Set wb = CreateObject("Excel.Application")
Dim strFile As String
strFile = "C:\path to my file\filename.csv"
wb.Workbooks.Open (strFile)
With wb
.SaveAs FileName:=Replace(strFile, ".csv", ".xls")
.Close True
End With
Set wb = Nothing
End Sub
【问题讨论】:
标签: excel vba ms-access csv xls