[C++]
class CXllFinder
The CXllFinder class is a utility class to help you search and replace the contents and formulae of cells.
Note that only one instance of CXllFinder can be used at a time, since the class manipulates the active selection. CXllFinder can only be used from macro functions. It will fail if used from worksheet functions.
Use the finder class with the following pattern:
char achMatch[] = "fred"; CXllFinder finder(achMatch, ...); CXlRef xlrFind; while (finder.FindNext(xlrFind)) { // Inspect the current value CXlOper xloValue; finder.GetCurrentValue(xloValue); // Use the current value... // Change the value in the matched cell finder.SetCurrentValue("replaced"); }
Header: xllfinder.h