fpspreadsheet: Add string concatenation operation & to expression parser; remove string concatenation by means of "+"

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3501 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-08-22 10:54:55 +00:00
parent e122d42652
commit 5257052685
3 changed files with 70 additions and 17 deletions

View File

@ -31,14 +31,15 @@ begin
workbook := TsWorkbook.Create;
try
worksheet := workbook.AddWorksheet('Test');
{
worksheet.WriteNumber(0, 0, 2); // A1
worksheet.WriteNumber(0, 1, 2.5); // B1
{
}
worksheet.WriteUTF8Text(0, 0, 'Hallo'); // A1
worksheet.WriteUTF8Text(0, 1, 'Welt'); // B1
}
cell := worksheet.WriteFormula(1, 0, '=(A1+2)*3'); // A2
worksheet.WriteUTF8Text(0, 1, 'World'); // B1
//cell := worksheet.WriteFormula(1, 0, '=(A1+2)*3'); // A2
cell := worksheet.WriteFormula(1, 0, 'A1&" "&B1');
WriteLn('A1 = ', worksheet.ReadAsUTF8Text(0, 0));
WriteLn('B1 = ', worksheet.ReadAsUTF8Text(0, 1));