自己搞定了
存为只读文件的方法
Excel宏:
ActiveWorkbook.SaveAs Filename:= "盘符:/文件夹名/文件名.xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="963", ReadOnlyRecommended:= True, CreateBackup:=False
VB语法:
Exwbook.SaveAs FileName:="盘符:/文件夹名/文件名.xls", FileFormat:=xlNormal, Password:="", writerespassword:="963", ReadOnlyRecommended:=False, CreateBackup:=False
Delphi语法:
ExcelApp.ActiveWorkbook.SaveAs('盘符:/文件夹名/文件名.xls',1,'','963',True,False);
另外打开Excel只读文件而不显示确认对话框
ExcelApp.WorkBooks.Open(FileName,True,True);