[Solved] Find and replace multiple values at once in OpenOffice

Discuss the word processor
Locked
pe7er
Posts: 9
Joined: Wed Feb 05, 2025 2:35 pm

[Solved] Find and replace multiple values at once in OpenOffice

Post by pe7er »

I know there are online tools, but this is a good software, and I would like to do this directly while working.

Thanks in advance for any advice.
Last edited by pe7er on Tue Feb 11, 2025 5:43 pm, edited 1 time in total.
OpenOffice 4.1 on Windows 11
Writers Board in DB-UK Community
User avatar
Hagar Delest
Moderator
Posts: 33633
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: How to find and replace multiple values at once in OpenOffice?

Post by Hagar Delest »

Do you mean replace multiple instances of a single one string? In this case standard Find & Replace feature is the way to go.
If you want to replace several strings, then you may use a macro and either hard code the strings or create a dialog to provide them.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
pe7er
Posts: 9
Joined: Wed Feb 05, 2025 2:35 pm

Re: How to find and replace multiple values at once in OpenOffice?

Post by pe7er »

I mean something like this:
image F.jpg
image F.jpg (36.75 KiB) Viewed 4778 times
OpenOffice 4.1 on Windows 11
Writers Board in DB-UK Community
User avatar
floris v
Volunteer
Posts: 4638
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: How to find and replace multiple values at once in OpenOffice?

Post by floris v »

If the strings that you want to replace follow some pattern, you may try something with regular expressions, aka wildcards. If they are all completely different, you will probably need a macro to do the replace commands batch wise.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: How to find and replace multiple values at once in OpenOffice?

Post by RoryOF »

Find and Replace is so fast you might be better advised to do individual Find and Replace cycles for each unique instance than to be looking for and debugging some automated method of doing the task.

Alternately, download and install AltSearch extension and use its batch mode.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Find and replace multiple values at once in OpenOffice

Post by JeJe »

With regular expressions ticked you can do a search for multiple items by separating them with "|" eg "fish|mammals" will find both.

But to do a replace like you want you'll either need a macro, or you could download the AltSeach extension and look at batch operations using it as RoryOF says.

https://extensions.openoffice.org/en/pr ... -altsearch
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: Find and replace multiple values at once in OpenOffice

Post by Bill »

pe7er wrote: Sun Feb 09, 2025 1:22 pm I know there are online tools, but this is a good software, and I would like to do this directly while working.

Thanks in advance for any advice.
OpenOffice can't do this. The online tool has multiple "find" and "replace" boxes. OpenOffice does not.

Find and Replace - Multiple Text Online
AOO 4.1.14 on Ubuntu MATE 22.04
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: [Solved] Find and replace multiple values at once in OpenOffice

Post by JeJe »

Correction: AltSearch does this without needing a batch file. From the help:
text1||text2||text3||… - multiple search and replace operations in one step:
Add the sign || to the end of the search and replace expressions to delimit the partial searches and replacements.
Search for: text1||text2||text3
Replace: neco1||neco2||neco3
This will search for text1 and will replace it with neco1, then continue the search for text2, replace it by neco2, etc.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Locked