Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\aaa.xls",password:="123456") app.visible = True
清除密码,这样写
Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\aaa.xls",password:="123456") App.DisplayAlerts = False wb.saveas("d:\temp.xls",password:="") app.visible = True