Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink property

Status
Not open for further replies.

maccarone

Technical User
Jun 20, 2002
17
IT
I have to create an excel spreadsheet via HTML.
I have no problem creating it but I don't know how is possible to use the hyperlink property that allow me to show a value into a cell and link that cell with an http URL.
How is possible ??

Thanks

Massimo
 

Do you mean creating an Excel spreadsheet, or do you mean creating an Excel-like spreadsheet?

AFAIK, creating an Excel spreadsheet via HTML alone (no scripting, etc) is impossible.

If the latter, simply use an anchor element with an href attribute inside your cell:

Code:
<td><a href="someURL.html">text</a></td>

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
I create an excel spreadsheet in this way:
<?PHP
$filename = "sheet.xls";
header ("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=$filename");
?>
<table border="1">
<?PHP
for ($i=1; $i<11; $i++)
{
echo "<tr>";
for ($x=1; $x<11;$x++)
{
$r = $i * $x;
echo "<td>$r</td>";
}
echo "</tr>";
}
?>
</table>

All works fine, I'm able to open xls file with excel but I'm not able to use the yperlink property for a td. In other word I'm not able to show e.g First_data into a cell and open an hpp page like " It is possible makin excel spreadsheeet manually but I don't know if it's possible to create it without javascript !!!
 
This works fine for me - it opens a browser window in Excel:

Code:
<td><a href="[URL unfurl="true"]http://www.google.co.uk/">Text</a></td>[/URL]

Dan



[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top