Setting cell color without existing cell

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
torerik
Posts: 5
Joined: Fri Nov 12, 2004 2:08 am
Location: Norway

Setting cell color without existing cell

Post 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
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Setting cell color without existing cell

Post by larsa »

Hello

The problem with AsBlank is fixed in update 5.10.08.
Lars Arvidsson, Axolot Data
Post Reply