I want to remove Protection of a xls file,
My Code:
xls1.Filename := 'c:\aa.xls';
xls1.Read;
xls1.Sheets[0].SheetProtection := [];
xls1.Write;
it seems not work.
why?
delphi xe & xlsreadwrite II 4.0053
about SheetProtection
Re: about SheetProtection
[quote="vga"]I want to remove Protection of a xls file,
[/quote]
It seems that the current version erroneously inserts sheet protection into the xls file regardless of your code.
I have already reported this as a bug.
It has existed afaik at least since 4.00.49, but may be related to reading an already malformed xls, because creating a new xls file programatically works ok.
T.
[/quote]
It seems that the current version erroneously inserts sheet protection into the xls file regardless of your code.
I have already reported this as a bug.
It has existed afaik at least since 4.00.49, but may be related to reading an already malformed xls, because creating a new xls file programatically works ok.
T.
Re: about SheetProtection
when add:
xls1.Sheets[0].SheetProtection := DefaultSheetProtections;
it work fine now.
xls1.Sheets[0].SheetProtection := DefaultSheetProtections;
it work fine now.