Hi,
I am trying to modify the colors of the cell. I had thought the following code would do the trick:
ExcelColorPalette[1]:=$00F1E5DB; // light blue
with XLSCMI.Sheet[0] do Begin
AsString[0,0]:=CountryEdit.Text;
Cell[0,0].FontSize:=16;
Cell[0,0].FontStyle:=[xfsBold];
Cell[0,0].FillPatternForeColor:= xc1;
.....
the code (which would be suggested by the C++ example on the forum
ExcelColorPalette[xc1]:=$00F1E5DB;
does not compile
I have obviously misunderstood something
best
Jon
Colors
Re: Colors
Hello
ExcelColorPalette uses integer for index, not TExcelColor values. Hence vill the code ExcelColorPalette[xc1]:=$00F1E5DB not compile.
You can however use ExcelColorPalette[Integer(xc1)]:=$00F1E5DB
ExcelColorPalette uses integer for index, not TExcelColor values. Hence vill the code ExcelColorPalette[xc1]:=$00F1E5DB not compile.
You can however use ExcelColorPalette[Integer(xc1)]:=$00F1E5DB
Lars Arvidsson, Axolot Data
-
- Posts: 5
- Joined: Sat Apr 02, 2011 2:10 pm
Re: Colors
Hi again,
Yes, I have tried that - it does compile and changes the palette, but does not have any effect on the colors in the spreadsheet.
jon
Yes, I have tried that - it does compile and changes the palette, but does not have any effect on the colors in the spreadsheet.
jon
-
- Posts: 5
- Joined: Sat Apr 02, 2011 2:10 pm
Re: Colors
Hi,
Found a solution. It works if I for example use xc30 instead of xc1. From reading the code it seems that values less than 8 are not valid.
(see line 2305 in XLSReadWriteII4.pas)
best
Jon
Found a solution. It works if I for example use xc30 instead of xc1. From reading the code it seems that values less than 8 are not valid.
(see line 2305 in XLSReadWriteII4.pas)
best
Jon