How to prevent ParseException in .NET Excel Library

16 Aug 20261 minute to read

To prevent a ParseException when modifying formulas that reference undefined named ranges, set the ThrowOnUnknownNames property to false before updating the formula.

workbook.ThrowOnUnknownNames = false;
workbook.ThrowOnUnknownNames = false;
workbook.ThrowOnUnknownNames = False

This ensures that formulas with undefined named ranges won’t trigger errors during assignment or modification.