Questions and answers on how to use XLSReadWriteII 5.
DrTob
Posts: 20 Joined: Tue Jul 19, 2011 2:31 pm
Post
by DrTob » Mon Mar 31, 2014 1:31 pm
I try to create borders around some cells with the following code:
Code: Select all
0: FSheet.AsString[x,y] := ''; //"Create" cell
1: MakeBorder(FSheet.Cell[x,y]);
procedure TqsmComarisonViewXLSExport.MakeBorder(const ACell: TXLSCell);
begin
2: ACell.BorderLeftStyle := cbsThin;
3: ACell.BorderLeftColor := xcGray50;
4: ACell.BorderBottomStyle := cbsThin;
5: ACell.BorderBottomColor := xcGray50;
6: ACell.BorderTopStyle := cbsThin;
7: ACell.BorderTopColor := xcGray50;
8: ACell.BorderRightStyle := cbsThin;
9: ACell.BorderRightColor := xcGray50;
end;
I get an exception at row 8: 'SST String is Nil'. This exception occours always at the fourth/last border. Changing the order does not have any effect.
larsa
Site Admin
Posts: 926 Joined: Mon Jun 27, 2005 9:30 pm
Post
by larsa » Tue Apr 01, 2014 5:05 am
Hello
When formatting cells, use the CmdFormat object. Please study the FormatCells sample for more details.
Lars Arvidsson, Axolot Data