Thanks, but I don't think the loop is the issue because all the cell values display correctly, and Bold correctly. Only the color doesn't show up. Here is the original (abbreviated) code without the troubleshooting of TempInt above. I am dumping values from an array and then want to highlight ones above a certain value; I can do so using Bold but not color. Color does work if I simply replace "column" for that line with any actual number. The many other things I am doing with fpspreadsheet work fine too; I love it.
Row, Column: integer;
FlagValue : real;
PropsArray: array of array of real; //setlength done elsewhere
for Row := 1 to i do begin
for Column := 1 to j do begin
MyWorksheet.WriteNumber(row, column, PropsArray[row,column]);
If PropsArray[row,column] > FlagValue then begin
MyCell := MyWorksheet.GetCell(row,column); //works with a number... everything else is fine
MyCell^.BackgroundColor:=scPURPLE;
MyCell^.UsedFormattingFields := [uffBackgroundColor];
MyWorksheet.WriteUsedFormatting(row,column, [uffBold]);
end;
end; //Column
end; //Row
Is that sufficient? Thank you for your time.