none
Excel Range.Replace on single cell doesn't work anymore RRS feed

  • Question

  • Hi,

    i hope this is the correct forum my issue.

    I have an Excel VSTO AddIn written in C#. This was working fine for months and without any changes some functionality is broken.

    I think there is a new bug with inside the latest Excel updates.

    I have a button inside a ribbon, that only replace white-spaces by an empty string. Nothing more.
    Now if I do the replace only on a single cell, all the text on the complete worksheet will be replaced :(

    I created a small repro for this: https://github.com/IT-CASADO/excel-vsto-replace-bug

    Please start the Add-In by pressing F5 in Visual Studio (2019).
    Then open the demo file "DemoData.xlsx"
    Then select the first text block from E7:I16 and click the ribbon button "Click to replace selected cells" -> everything is working only the highlighted range is searched and replaced

    Then select the second text block from E22 (single cell) -> the single cell is highlighted, but unfortunately everything in the active worksheet is searched and replaced

    I tried the same thing with plain VBA (see "DemoData.xls") and everything works as expected!

    For me a bug !?

    Regard,
    Daniel

    Thursday, October 10, 2019 8:41 PM

All replies