Different cell borders

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
jleg
Posts: 11
Joined: Thu Apr 04, 2013 12:04 pm
Location: France

Different cell borders

Post by jleg »

Hello,

In v4, we could use the properties BorderLeftStyle, BorderBottomSyle,... to set border's style but in V5, how can i set different styles to the borders of a cell using CmdFormat (FStyle is define protected in the class).

I know i can do it if i set the border for a particular cell (ex: XLS[0].Cell[Col, Row].BorderBottomStyle := ...) but i would like to create default formats and use them when needed.

Thanks for your help.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Different cell borders

Post by larsa »

Hello

Here is a sample:

Code: Select all

  FXSS.XLS.CmdFormat.BeginEdit(FXSS.XLS[0]);

  XLS.CmdFormat.Border.Color.IndexColor := xcRed;
  XLS.CmdFormat.Border.Style := cbsThick;

  XLS.CmdFormat.Border.Side[cbsTop] := True;
  XLS.CmdFormat.Border.Side[cbsBottom] := True;

  XLS.CmdFormat.Apply(1,3,8,3);
Lars Arvidsson, Axolot Data
jleg
Posts: 11
Joined: Thu Apr 04, 2013 12:04 pm
Location: France

Re: Different cell borders

Post by jleg »

Hello,
It's ok now in 5.10.17, if i'm right, i had the problem in default format.
Thanks again.
Post Reply