Inserting a hyperlink through ADO

  • Thread starter Thread starter Chris Hardie
  • Start date Start date
C

Chris Hardie

Hi,

I'm using ADO in my ASP page to insert data into an Excel spreadsheet,
but I am having difficulty inserting a hyperlink. When I try to add
=HYPERLINK("http://sometite.com", "Click here") to the spreadsheet,
the expression gets hard coded into the cell instead of evaluating
down into a hyperlink. The only way to turn it into a link is to
double click the cell, which would be time-consuming as I have
thousands of records to complete.

Anyone have any ideas?

Thanks,

Chris
 
Chris,

No guarantees, but give something like this a try...

Range("B10").Formula = "=HYPERLINK(""http://sometite.com"", ""Click here"")"

Regards,
Jim Cone
San Francisco, USA
 
Hi Chris,

Chris said:
I'm using ADO in my ASP page to insert data into an Excel spreadsheet,
but I am having difficulty inserting a hyperlink. When I try to add
=HYPERLINK("http://sometite.com", "Click here") to the spreadsheet,
the expression gets hard coded into the cell instead of evaluating
down into a hyperlink. The only way to turn it into a link is to
double click the cell, which would be time-consuming as I have
thousands of records to complete.

I'm not sure if this is possible through ADO. AFAIK, ADO will only allow
you to retrieve/update cell *values*, not formulas.

If you need to modify formulas, I think you'd have to go with Automation
(not advised on a web server) or something like ExcelWriter:

http://officewriter.softartisans.com/officewriter-37.aspx

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
Are you creating a file for download, or using an Excel file on the server
as a database?
It's not clear from your post exactly which you're doing.

If creating for download, are you using Excel automation or creating the
sheet via HTML/XML?


Tim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

recalculate hyperlink location 4
code for Allow Insert Hyperlink 2
Open "Insert Hyperlink" popup window with VBA? 3
Copy hyperlinks 6
Find the row for a Hyperlink 2
Hyperlinks 3
HELP! 6
Still need help 2

Back
Top