Home > Back-end >  Delphi export Excel save times wrong worksheet to protect
Delphi export Excel save times wrong worksheet to protect

Time:10-01

Delphi is used to derive a Excel worksheets, finally saved when want to save the worksheet for protection, but the system error of the program, the error 800 a03ec, HTML code is as follows, everybody to help me have a look, thank you,
MsExcel. DisplayAlerts:=false;
MsExcel. Range [' A1 ', 'I200]. Locked:=True;
MsExcel. Range [' A1 ', 'I200] FormulaHidden:=True;
MsExcel. ActiveSheet. Protect (Password:='yjs', DrawingObjects:=True, Contents:=True, Scenarious:=True).
MsExcel. ActiveWorkbook. Save;
MsExcel. Workbooks [1]. The Close (True, mypath + 'table \ \ budget implementation adjustment. XLS ", false);
MsExcel. Quit;
MsExcel:=the Unassigned;
Olecontainer1. CreateLinkToFile (str1, false);
Comment out the line 2 and 4 normal, perform an error in the fourth row,

CodePudding user response:

MsExcel:=the Unassigned; This will remove
  • Related