Results 1 to 7 of 7

Thread: Using Libreoffice Calc to create a link in a spreadsheet

  1. #1

    Default Using Libreoffice Calc to create a link in a spreadsheet

    opensuse 42.3
    libbreoffice 6.0.4

    I have a spreadsheet with two columns: the name of a school COL-A, and its URL COL-B. I wish to combine the contents of the two columns into a third to create a link: <a href="COL-B">COL-A</a>.

    What would be the expression to create that string?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,650
    Blog Entries
    15

    Default Re: Using Libreoffice Calc to create a link in a spreadsheet

    Quote Originally Posted by jimoe666 View Post
    opensuse 42.3
    libbreoffice 6.0.4

    I have a spreadsheet with two columns: the name of a school COL-A, and its URL COL-B. I wish to combine the contents of the two columns into a third to create a link: <a href="COL-B">COL-A</a>.

    What would be the expression to create that string?
    Hi
    Well a URL will automatically hyperlink?

    Code:
    =hyperlink(COL-B,COL-A)
    
    A1="Some School"
    B1="https://some-school.edu"
    C1="=hyperlink(A1,B1)"
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: Using Libreoffice Calc to create a link in a spreadsheet

    If you want the actual text then:

    ="<a href='" & """" & B1 & """" & ">" & A1 & "</a>"
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  4. #4

    Default Re: Using Libreoffice Calc to create a link in a spreadsheet

    Quote Originally Posted by malcolmlewis View Post
    Code:
    A1="Some School"
    B1="https://some-school.edu"
    C1="=hyperlink(A1,B1)"
    The proper order is "hyperlink(b1, a1)"; otherwise, just what I wanted.

    Thank you!

  5. #5
    Join Date
    Jun 2008
    Location
    USA
    Posts
    1,125

    Default Re: Using Libreoffice Calc to create a link in a spreadsheet

    What is the purpose of the third column? Why not just make column B the hyperlink? This is not a criticism, just a question of layout that I might be missing and be able to use on my own elsewhere.
    Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke

  6. #6

    Default Re: Using Libreoffice Calc to create a link in a spreadsheet

    Quote Originally Posted by d3vnull View Post
    If you want the actual text then:
    ="<a href='" & """" & B1 & """" & ">" & A1 & "</a>"
    Excellent. Thank you.

    After working with the hyperlink() function, I realized that wasn't quite what I wanted; it was the actual text of an URL that is desired. The above provides that.

  7. #7

    Default Re: Using Libreoffice Calc to create a link in a spreadsheet

    Quote Originally Posted by Prexy View Post
    What is the purpose of the third column? Why not just make column B the hyperlink?
    The spreadsheet is generated by our CRM service. We are creating a report that will be re-formatted into a HTML table that is inserted into to our website to display the results. Part of the display is the company name is also a link to that company.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •