SheetAccess: Boolean;
The SheetAccess property determines whether sheet and cell protection should be exported to XLS (*xls) format.
If the value of the property is True, sheet and cell protection is exported. If the value is False, it is not.
By default the property is set to False.
Note that Microsoft Excel will set sheet protection with an empty password, even if a password was set for sheet protection in the report.
This example is supposed to have the Report object of the IPrxReport type.
Sub UserProc;
Var
Report: IPrxReport;
Tab: ITabSheet;
Exp: ITabSheetExporter;
Begin
Tab := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Exp := New TabSheetExporter.Create;
Exp.TabSheet := Tab;
Exp.SheetAccess := True;
Exp.ExportToFile("c:\Report1.xls", "XLS");
End Sub UserProc;
Sheet and cell protection is exported during the export.
See also: