Formulas fails when <CR> inside
Posted: Tue Feb 20, 2018 11:29 am
The problem is easy to reproduce
Code fails and memory leak present: TXLSTokenizerList is not destroed.
MS Excel has no problems parsing such expressions.
I suggest the next improvement in file XLSTokenizer5.pas:
Regadrs
Moisha
Code: Select all
xls := TXLSReadWriteII5.Create(nil);
xls[0].AsFormula[1, 1] := 'IF(A1="";'#13'"1";"0")';
MS Excel has no problems parsing such expressions.
I suggest the next improvement in file XLSTokenizer5.pas:
Code: Select all
procedure TXLSTokenizer.EatWhitespaces;
begin
while CharInSet(CurrChar, Xc12Chr_WhitespaceChars) do // instead of CurrChar = Xc12Chr_Space
Eat;
end;
Moisha