Author: Jonas Bilinkevicius How to format the cell borders of an Excel spreadsheet Answer: Various ways of setting borders on a worksheet (WS): 1 { ... } 2 var 3 Rng: OleVariant; 4 LeftEdge: Border; 5 { ... } 6 WS.Range['A5', 'D5'].Borders.Item[xlEdgeTop].Weight := xlThick; 7 WS.Range['A5', 'D5'].Borders.Item[xlEdgeTop].Color := clYellow; 8 WS.Range['A5', 'D5'].Borders.Item[xlEdgeBottom].Linestyle := xlDouble; 9 WS.Range['A5', 'D5'].Borders.Item[xlEdgeBottom].Color := clYellow; 10 { ... } 11 12 { ... } 13 WS.Evaluate('B6, C6, D6, E6, F6').Borders.Item[xlEdgeLeft].Line 14 style := xlContinuous; 15 Rng := WS.Range['A1', 'A1']; 16 Rng.BorderAround(xlContinuous, xlThin, Color := clFuchsia); 17 LeftEdge := WS.Range['B2', 'B5'].Borders.Item[xlEdgeLeft]; 18 LeftEdge.Linestyle := xlContinuous; 19 LeftEdge.Weight := 3; 20 LeftEdge.Color := clLime; 21 { ... }