Open-XML-SDK icon indicating copy to clipboard operation
Open-XML-SDK copied to clipboard

Adding CellFormula - on opening with Excel, @ have been injected. How to avoid?

Open hohae opened this issue 1 year ago • 2 comments

Describe the bug I'm building up an excel sheet. I'm using CellFormula to add a formula to a cell. That works fine. When opening the file with Excel, @ characters are injected into the formula and the formula is broken.

Sample formula:

=WENN(ANZAHL2('I&C Extension'!D3:E3)>1;INDEX(D2:D1300;VERGLEICH(INDEX(A:A;ZEILE())&"OC001";A2:A1300&C2:C1300;0));Material!C9)

ends up as

=WENN(ANZAHL2('I&C Extension'!D3:E3)>1;INDEX(D2:D1300;VERGLEICH(@INDEX(A:A;ZEILE())&"OC001";@A2:A1300&@C2:C1300;0));Material!C9)

Using version 2.20.

There are hints for VBA to use CellFormula2, but this isn't available in the SDK. How to avoid this?

hohae avatar Sep 19 '24 18:09 hohae