[Solved] Convert email to URL?

Discuss the spreadsheet application
Post Reply
jon oneill
Posts: 17
Joined: Fri May 13, 2016 1:11 pm

[Solved] Convert email to URL?

Post by jon oneill »

Hi, is there a way to convert a list of emails to urls in Calc?

joe@bloggs.com
to
http://www.bloggs.com

Thanks
Last edited by Hagar Delest on Tue Oct 22, 2019 7:52 am, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.4 / MacOS 10.13.6 High Sierra
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: convert email to URL?

Post by FJCC »

First, select all of the cells you want to affect. Using Edit -> Find & Replace, set Search For to
^[^@]+@
and set Replace With to
www.

Under More Options, choose Regular Expressions and Current Selection Only. Click Replace All and you should be done. I would definitely save a copy of the document in case you replace more than you mean to.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
jon oneill
Posts: 17
Joined: Fri May 13, 2016 1:11 pm

Re: convert email to URL?

Post by jon oneill »

FJCC wrote:First, select all of the cells you want to affect. Using Edit -> Find & Replace, set Search For to
^[^@]+@
and set Replace With to
www.

Under More Options, choose Regular Expressions and Current Selection Only. Click Replace All and you should be done. I would definitely save a copy of the document in case you replace more than you mean to.
You have saved me loads of time! thanks a lot!

Couple of other quick questions if you have a second?

Now the urls are in the cells, is there a way to bulk convert them to clickable links? I know that pressing space after them in the cell does this, but is there a less manual way?

Also, bit of a long shot, but is there a way to select and move the email address from a cell to the adjacent cell?
Cell contains : "Joe Bloggs joe@bloggs.com"
Is there a way to split the name and address to two cells: "Joe Bloggs" | "joe@bloggs.com"

Thanks a lot
OpenOffice 4.1.4 / MacOS 10.13.6 High Sierra
User avatar
robleyd
Moderator
Posts: 5086
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Convert email to URL?

Post by robleyd »

Is there a way to split the name and address to two cells: "Joe Bloggs" | "joe@bloggs.com"
You could adapt the techniques proposed in How to find the last word in cell, copy to new cell or in Splitting Full Name into F|M|L
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Convert email to URL?

Post by Lupp »

(Not concerning the original question, but only the addendum.)

Recent versions of LibreOffice have the REGEX function which is useful with tasks of this kind.
See attached example. Note: The example will not work in AOO or old versions of LibO. It needs LibO V 6.2.y or higher.
See https://wiki.documentfoundation.org/Rel ... _functions
Attachments
splitByREGEXdemo.ods
(8.91 KiB) Downloaded 96 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Convert email to URL?

Post by John_Ha »

See [Tutorial] How to record a macro (and Regular Expressions) for help on Regular Expressions which are used to manipulate text strings.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
jon oneill
Posts: 17
Joined: Fri May 13, 2016 1:11 pm

Re: [Solved] Convert email to URL?

Post by jon oneill »

Just gotta say thanks for all this, saving me a ton of time :) Really appreciate all your advice
OpenOffice 4.1.4 / MacOS 10.13.6 High Sierra
Post Reply