Sort data in LibreOffice Writer
Tommy Trussell
tommy.trussell at gmail.com
Fri Feb 25 00:57:02 UTC 2022
On Wed, Feb 23, 2022 at 5:25 PM Jay Ridgley <jridgley2 at austin.rr.com> wrote:
> My wife has created a large number if recipe cards, over a period of
> several years, in a single file. Is there any way to alphabetize them by
> recipe name.
>
> They are formatted as a single page in most cases, however, a few are
> two pages long. The page if formatted for a 4x6 card. There are well
> over 200 of them. I have not seen anything that provides a clue on how
> to sort them.
>
> There is a title line (naturally) and a body but other than the title
> being on a single line at the top of the page they are just a file of
> data records.
>
I responded earlier describing a method using the Navigator. (According to
the LibreOffice documentation, you should be able to drag Navigator titles
or headings around at will. I suggested the arrow buttons because I
couldn't get the headings to drag when I tried. Version: 7.2.5.2 / Ubuntu
21.10. However I might just have a recalcitrant touchpad.)
Although I have thoroughly enjoyed the other suggestions,* it spurred me to
look a bit harder to find a way to get LibreOffice itself do the sorting
WITHOUT exporting and importing, learning XSLT, FODT, splitting the recipes
into 200 individual files, etc. etc. SO...
I found a LibreOffice macro that sounds very promising:
https://ask.libreoffice.org/t/writer-is-it-possible-to-sort-a-documents-content-based-on-headings/31438/2
I really like this idea, but it still requires you to format the document
using Heading 1 styles (just like with the Navigator; not difficult, but
possibly a new idea to you). It also requires you to learn a bit about
macros, insert the one supplied into your Writer document, and debug it.
Maybe this isn't too far beyond your experience, or maybe it is.
Please follow up to let us know how far afield we got in our responses!
* From the mid-1980s to the early 2000s I worked as a technical writer and
editor in various software development groups. When confronted with such an
issue at work I would have jumped right in and evaluated data conversions
or scripts as folks described, especially if it was something that was
going to come up regularly. In the '80s I occasionally wrote HyperTalk
scripts to generate and process Word RTF on a Macintosh, for example.
HOWEVER I have worked with plenty of authors, including technical writers,
who are MUCH more comfortable dealing with a more "manual" process, even if
it takes longer. There's nothing wrong with shifting headings around using
the Navigator (similar to the "Outline" view in Microsoft Word, if you've
used that). Whatever works for you! Please let us know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20220224/43d32910/attachment.html>
More information about the ubuntu-users
mailing list