unvell / ReoGrid

Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
https://reogrid.net
MIT License
1.32k stars 390 forks source link

Wrong string concatenation formula behavior #473

Closed ycherkes closed 1 year ago

ycherkes commented 1 year ago

Description

ReoGrid adds a wrong number of quotes when calculating the formula with string concatenation.

To Reproduce

  1. ReoGrid Demo 3.0.0 Go to 'File -> New Editor'
  2. Type any text, for example: first in a cell A1
  3. Type a formula ="var " &A1 & "Member=""" &A1 & "Value"";" in a cell B1
  4. Copy the result of the formula to notepad. You've got a var firstMember=""firstValue"";
  5. The same manipulations in MS Excel give var firstMember="firstValue";

Screenshots

image image image

Edition

Environment

Test workbook for Excel<->ReoGrid behavior comparison: TestCodeGeneration.xlsx

ycherkes commented 1 year ago

PR!474 should fix this issue.

jingwood commented 1 year ago

@ycherkes Thanks very much!