Page 1 of 1

Setting cell color without existing cell

Posted: Sat Mar 23, 2013 6:43 pm
by torerik
This code generates an exception because there is no cell at A1:

Code: Select all

XLS := TXLSReadWriteII5.Create(nil);
XLS.Sheets[0].Cell[0, 0].FillPatternForeColorRGB := 0;
Earlier that was solved by setting LastCol and LastRow to a value.
Now, these are not writeable any more.

What is now the preferred method of creating an empty cell so that for example the cell color can be set?
I could not find any sample that created a blank cell.
Is it to write an empty string?
XLS.Sheets[0].AsBlank[0, 0] := True; // doesn't work either

Re: Setting cell color without existing cell

Posted: Mon Mar 25, 2013 6:48 am
by larsa
Hello

The problem with AsBlank is fixed in update 5.10.08.