I'm using XLSReadWriteII 6.32 to create a XLS file ('97).
I use XLS.CmdFormat to create a default format.
In this default format, I define some properties about Alignment, Font, Border, and Fill.
In my case, I set the cell background color like this (please tell me if I'm wrong, I read that only RGB property is used in the FormatCells Sample to set background, does it mean IndexColor is not recommended ?) :
Code: Select all
XLS.CmdFormat.Fill.BackgroundColor.IndexColor := _format.FillPatternBackColor;
Code: Select all
XLS.CmdFormat.AddAsDefault('F' + IntToStr(formatCount));
Code: Select all
XLS.DefaultFormat := XLS.CmdFormat.Defaults.Find('F' + IntToStr(_fmtIdx));
XLS[curSheet].AsFloat[_col, _row] := _number;
Thank you and best regards.