fpspreadsheet: Support for writing cell border (on/off, linestyle, color) and background color to xlsx files.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3315 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-07-13 22:09:27 +00:00
parent 3d7c3d06e3
commit f596a181b3
3 changed files with 284 additions and 15 deletions

View File

@@ -55,6 +55,21 @@ begin
MyCell := MyWorksheet.GetCell(2, 3);
MyCell^.UsedFormattingFields := [uffBold];
// Background and text color
MyWorksheet.WriteUTF8Text(4, 0, 'white on red');
Myworksheet.WriteBackgroundColor(4, 0, scRed);
MyWorksheet.WriteFontColor(4, 0, scWhite);
// Border
MyWorksheet.WriteUTF8Text(4, 2, 'left/right');
Myworksheet.WriteBorders(4, 2, [cbWest, cbEast]);
MyWorksheet.WriteHorAlignment(4, 2, haCenter);
Myworksheet.WriteUTF8Text(4, 4, 'top/bottom');
Myworksheet.WriteBorders(4, 4, [cbNorth, cbSouth]);
MyWorksheet.WriteBorderStyle(4, 4, cbSouth, lsThick, scBlue);
Myworksheet.WriteHorAlignment(4, 4, haRight);
// Creates a new worksheet
MyWorksheet := MyWorkbook.AddWorksheet('My Worksheet 2');