//* Options for the worksheet. TSheetOption = (soGridlines, //* Show gridlines. soRowColHeadings, //* Show row and column headings. soProtected, //* Worksheet is protected. soR1C1Mode, //* Show cells in R1C1 mode. soIteration, soShowFormulas, //* Show formulas instead of formula result. soFrozenPanes, //* Worksheet has frozen panes. soShowZeros //* Show zero values. ); TSheetOptions = set of TSheetOption;procedure TSheet.SetOptions(const Value: TSheetOptions);begin FRecords.WINDOW2.Options := $06B6 and not ($0001 or $0002 or $0004 or $0008 or $0010 or $0200);// FRecords.WINDOW2.Options := $0000; if soShowFormulas in Value then FRecords.WINDOW2.Options := FRecords.WINDOW2.Options or $0001; if soGridlines in Value then FRecords.WINDOW2.Options := FRecords.WINDOW2.Options or $0002; if soRowColHeadings in Value then FRecords.WINDOW2.Options := FRecords.WINDOW2.Options or $0004; if soFrozenPanes in Value then FRecords.WINDOW2.Options := FRecords.WINDOW2.Options or $0008; if soShowZeros in Value then FRecords.WINDOW2.Options := FRecords.WINDOW2.Options or $0010;end;
从源代码可以看出,对 soProtected 未作处理!!!