从Drupal 7导出后,可以在Excel中单击超链接内容

i am using the Drupal 7 "Views Data Export" module, and i want to make Hyperlink content clickable in Excel after export from a View.

Try to change your url field in views_data_export views page using rewrite output and paste there something like =HYPERLINK("[your_field]"; "[your_text]")

I finally create a drupal 7 export module:

  1. The sql request

  2. Construct the result as a html table (Excel accept html datas)

    <table> <tr> <th>Title_A</th> <th>Title_B</th> </tr> <tr> <td>Content_A</td> <td>Content_B</td> </tr> </table>

  3. Add headers to create a ".xls" file with the html table

    header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=file.xls");

  4. For the clickable links make a html "href"

    <td><a href='Content_URL'>Content_Link_Name</a></td>