Page 1 of 1

problem with 3.00.02a

Posted: Sun Oct 08, 2006 3:55 pm
by airsoft
strange problem produced with this source :

with X do
begin
Sheets [0].Name := 'test sheet';
for I := 0 to 7 do
for J := 0 to 12 do
Sheets [0].AsFloat [I, J] := Random (10000);
with Sheets [0].Range [3, 3, 5, 5] do
begin
BorderTopStyle := cbsThin;
BorderBottomStyle := cbsThin;
BorderRightStyle := cbsThin;
BorderLeftStyle := cbsThin;
BorderInsideVertStyle := cbsThin;
BorderInsideHorizStyle := cbsThin;
end;
Filename := 'D:\PROBA.XLS';
Write;
end;

where X is class TXLSReadWriteII2

when I've opened the file with Microsoft Excel (Office XP + Service Pack 3 - 10.6809.6811) I cannot modify the formatting of these cells

D4:F6 and cells immediate to them i.e. D3:F3, D7:F7, C4:C6 and G4:G6

Another test with 3.00.02a

Posted: Sun Oct 08, 2006 4:18 pm
by airsoft
with X do
begin
Sheets [0].Name := 'test sheet';
for I := 0 to 7 do
for J := 0 to 12 do
Sheets [0].AsFloat [I, J] := Random (10000);

(* with Sheets [0].Range [3, 3, 5, 5] do
begin
// NumberFormat := '# ##0.00';
BorderTopStyle := cbsThin;
BorderBottomStyle := cbsThin;
BorderRightStyle := cbsThin;
BorderLeftStyle := cbsThin;
BorderInsideVertStyle := cbsThin;
BorderInsideHorizStyle := cbsThin;
end;*)
C := Formats.Count;
with Formats.Add do
begin
// NumberFormat := '# ##0.00';
BorderTopStyle := cbsThin;
BorderBottomStyle := cbsThin;
BorderRightStyle := cbsThin;
BorderLeftStyle := cbsThin;
end;
for I := 3 to 5 do
for J := 3 to 5 do
Sheets [0].Cell [I, J].AssignFormat (C);

Filename := 'D:\PROBA.XLS';
Write;
end;

when the formatting is made in old way i.e manual add formatting i set it to each cell, then EXCEL works fine with no problems about cell formatting

Posted: Mon Oct 09, 2006 5:59 pm
by larsa
Hello

You must set the border color as well. In the next update, there will be a default border color when the border style is set.


Lars Arvidsson

Range property

Posted: Tue Oct 10, 2006 6:09 pm
by airsoft
thanks, works fine when I set Border????Color in pair with Border????Style, it's a good idea to be set as default color: xcAutomatic or you mean the same ?

Posted: Sun Oct 15, 2006 8:35 pm
by larsa
Hello

Yes, in the next update, the color will be set to xcAutomatic as default when the border style is set.


Lars Arvidsson