Macro SearchAndReplace for Calc

Help is needed very urgently. You need a macro capable of searching and replacing tables. Replacement is necessary for several words at once and on all pages of the book. I found a code that does the search and replace task, but it is very limited, my skills were not enough to make this code suitable. Please, help.

Sub SearchSheet
 Dim oSheet
 Dim oReplace
 Dim nCount
 oSheet = ThisComponent.Sheets(0)
 oReplace = oSheet.createReplaceDescriptor()
 oReplace.setSearchString("Xyzzy")
 oReplace.setReplaceString("123")
 oReplace.SearchWords = False
 nCount = oSheet.replaceAll(oReplace)
 MsgBox "Replaces" & nCount
End Sub

Does this mean that there is a list of search strings and a corresponding list of replacement strings? Will the replacements always be for the complete cell content or for parts inside?
(Depending on the case:) How can be assured that no replacement creates content which later may be found matching another search string and in turn be replaced with something else?
From what comes the need to do it by user code? F&R generally is well done interactively.

There is an unloading from PDF in which part of the characters in the text is incorrectly displayed. The symbols are different. And you need to search and replace these characters. The macro is needed for the fact that there are just as many such files. And this operation by CTRL + F is very long to perform.

This is a completely different task than your

as replacing single characters, but easier, as you probably dont need to have precautions against replacing parts of words.

Is this a charset-issue? Please describe the complete process of your “unloading from PDF”. Maybe handling this in a Office-Macro can be avoided by a proper import and there are tools specialized to charset-conversions.
.

So you need an outer loop to handle all/several files in a folder? All are Calc-Files?

I can’t find a way to understand what you actually mean and need. How does PDF come into the game? What is meant by “unload”? Why and how do the text pieces in question get into spreadsheets (your tag)? How should Find/Replace help against “incorrect display”? Which F&R tool do you activate with Ctrl+F? I have to call F&R from the menu or with the shortcut key Ctrl+H.. (Done so I can apply an action to All sheets of the current spreadsheet document.) At what point of your workflow shall the macro be useful? …

Why didn’t you attach a relvant example?