ApplyRows

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
thefreecat
Posts: 12
Joined: Mon Sep 12, 2005 10:52 pm

ApplyRows

Post by thefreecat »

Hello,

I am using the demo from XlsRWII/5 "SampleFormatCells".

I try to define a default format :

XLS.CmdFormat.BeginEdit(Nil);
XLS.CmdFormat.Fill.BackgroundColor.RGB := $7F7F10;
XLS.CmdFormat.Font.Name := 'Courier new';
XLS.CmdFormat.AddAsDefault('F1');

...and then apply that format to rows 1 to 5 :

XLS.CmdFormat.BeginEdit(XLS[0]);
XLS.DefaultFormat := XLS.CmdFormat.Defaults.Find('F1');
XLS.CmdFormat.ApplyRows(1,5);

But nothing happens. What is the proper way of applying a default format to several rows ?

Thanks,

JC
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: ApplyRows

Post by larsa »

Hello

Default formats are only used when you add cells, they will not work with rows.
Lars Arvidsson, Axolot Data
thefreecat
Posts: 12
Joined: Mon Sep 12, 2005 10:52 pm

Re: ApplyRows

Post by thefreecat »

Thanks for your quick answer Lars
Post Reply