代码,
Dim App As New MSExcel.Application
try
app.DisplayAlerts = False
Dim Wb As MSExcel.WorkBook = App.WorkBooks.open("d:\test.xls")
wb.SaveAs(Filename:= _
"d:\test.xls", _
FileFormat:=MSExcel.XlFileFormat.xlAddIn8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False)
catch ex As exception
msgbox(ex.message)
finally
app.quit
End try
参考
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.xlfileformat.aspx