Open/Modify/Save = Protected Sheet + Messed Up formatting

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
billegge
Posts: 23
Joined: Fri Feb 08, 2008 8:34 pm

Open/Modify/Save = Protected Sheet + Messed Up formatting

Post by billegge »

I have a file that if I open the file, write to a cell, then save the file - then open the file in Excel and as soon as I try to type in the cell Excel tells me that it is protected.

Also, the coloring gets messed up on one of the columns.

I cannot upload the file, please email me for the file at begge@decisionhr.com

I am using version 4.00.49

Here is the code I am using:

procedure TForm_BenefitsEETermMain.cxButton2Click(Sender: TObject);
var
XLS: TXLSReadWriteII4;
begin
XLS:= TXLSReadWriteII4.Create(nil);
try
XLS.Filename:= 'G:\TestData\Benefits\EETerm\March 18, 2011 TERMINATION LIST.xls';
XLS.Read;
XLS.Sheet[0].AsString[3, 3]:= 'Test Name';
XLS.Write;
finally
XLS.Free;
end;
end;
Post Reply