Reputation: 21
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.
Upvotes: 0
Views: 2160
Reputation: 21
I finally create a drupal 7 export module:
The sql request
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>
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");
For the clickable links make a html "href"
<td><a href='Content_URL'>Content_Link_Name</a></td>
Upvotes: 0
Reputation: 36
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]")
Upvotes: 1