1 person found this helpful
Yes, it's possible and fairly easy.
It's tricky to read Excel files from InDesign scripts, so it is probably easier to export your Excel file to a CSV file and have the script read that file. Perhaps that is a minor detail to you (perhaps it is not).
Thanks for your help John!
Converting it to a csv file would be fine. How would I go about trying to script it? Would it cause a problem if there was an entry for a USA product that was removed from the European version?
Ah, so not only do you want to know if it is possible, you actually want to do it!
How would you go about scripting it?
Well, there are lots of ways, but I would have the script start by reading in the CSV file and splitting each line into a search string and a replace string, and storing that pair in an array.
Then, iterate over the array and tell InDesign to run a find/replace with the given pair.
But perhaps your question was more concrete than that? You can find a myriad of tutorials and examples and soforth at the Scripting Resources page.
(On the other hand, you could instead adjust your Excel file to produce output compatible with the FindChangeByList script, and then not write any scripts. But you might find it more annoying to match its exact format in Excel, which is not really designed for that. Or maybe you'd find it easier.)