CSV to html – merge link and content from columns

If you have a table where one column is a link and another has some plain text and you want to merge these two together, this would be possible to achieve with grabcontent_col_fromlink and grabcontent_col_tolink

Original

Company websiteCompany nameLogin emailIdFirst nameLast name profile-image
https://wibergsweb.se/Wibergs Weblaura@example.com2070LauraGreyhttps://wibergsweb.se/wp-content/uploads/pexels-george-dolgikh-1310522.jpg
https://google.se/Googlecraig@example.com4081CraigJohnsonno image
https://wibergsweb.se/Wibergs Webmary@example.com9346MaryJenkinshttps://wibergsweb.se/wp-content/uploads/pexels-pixabay-415829.jpg
https://google.se/Googlejamie@example.com5079JamieSmithno image

Merge two columns

To merge cells togetether from two columns there are twp attributes that needs to cooperate:grabcontent_col_fromlink and grabcontent_col_tolink.

grabcontent_col_fromlink: This is the column where you have your current link (e.g. https://wibergsweb.se/))
grabcontent_col_tolink: This column’s value (e.g. Wibergs Web) is now the clickable part of the link. When clicked on the link it moves on the link grabbed with grabcontent_col_fromlink.

The example below shows how to achieve this.

Shortcode
[csvtohtml_create source_type="guess" source_files="email.csv" csv_delimiter=";" grabcontent_col_fromlink="Company website" grabcontent_col_tolink="Company name"]
Company websiteCompany nameLogin emailIdFirst nameLast name profile-image
https://wibergsweb.se/Wibergs Weblaura@example.com2070LauraGreyhttps://wibergsweb.se/wp-content/uploads/pexels-george-dolgikh-1310522.jpg
https://google.se/Googlecraig@example.com4081CraigJohnsonno image
https://wibergsweb.se/Wibergs Webmary@example.com9346MaryJenkinshttps://wibergsweb.se/wp-content/uploads/pexels-pixabay-415829.jpg
https://google.se/Googlejamie@example.com5079JamieSmithno image

Hide columns

You maybe don’t want both columns to be visible to user after doing this conversion of links. You could use hide_cols to achieve this. In this example it would be relevant to hide the ”Company website” column:

Shortcode
[csvtohtml_create source_type="guess" source_files="email.csv" csv_delimiter=";" grabcontent_col_fromlink="Company website" grabcontent_col_tolink="Company name" hide_cols="Company website"]
Company websiteCompany nameLogin emailIdFirst nameLast name profile-image
https://wibergsweb.se/Wibergs Weblaura@example.com2070LauraGreyhttps://wibergsweb.se/wp-content/uploads/pexels-george-dolgikh-1310522.jpg
https://google.se/Googlecraig@example.com4081CraigJohnsonno image
https://wibergsweb.se/Wibergs Webmary@example.com9346MaryJenkinshttps://wibergsweb.se/wp-content/uploads/pexels-pixabay-415829.jpg
https://google.se/Googlejamie@example.com5079JamieSmithno image