Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Add hyperlinks to a cell

Last post 10-13-2008 3:51 by Michael Oppitz. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-02-2008 4:03

    Add hyperlinks to a cell

    Hi,

     is it possible to add a hyperlink to a cell that refers to another worksheet in the same workbook using the excelexporter? I'm generating an excelworkbook that contains about 10 - 20 sheets. Now I want to add an "index sheet" to the workbook from which you can jump top the different sheets.

    Regarding this i have another question is it possible to add a sheet to a workbook at a predefined position? What I mean is that I wnat to insert  a worksheet and not to add (always last position).

    Thank you

    Michael

    • Post Points: 20
  • 07-02-2008 9:53 In reply to

    Re: Add hyperlinks to a cell

    Answer

    Michael Oppitz:
    is it possible to add a hyperlink to a cell that refers to another worksheet in the same workbook using the excelexporter? I'm generating an excelworkbook that contains about 10 - 20 sheets. Now I want to add an "index sheet" to the workbook from which you can jump top the different sheets.

    Excel allows adding hyperlinks through two ways. The first is directly typing the hyperlink in the cell. It is then auto-converted and special information is written out with the file to indicate the cell has a hyperlink. However, our Excel assembly does not support this. The other way is to set a formula on the cell using the HYPERLINK function, such as =HYPERLINK("http://www.infragistics.com"). You could do this by using the ApplyFormula method on the cell. That being said, I have never tried hyperlinking to a specific worksheet in Excel. I'm curious to know what the syntax of the link looks like. If it doesn't work using the HYPERLINK function, you can submit a feature request to support the other hyperlink style: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.

    Michael Oppitz:
    Regarding this i have another question is it possible to add a sheet to a workbook at a predefined position? What I mean is that I wnat to insert  a worksheet and not to add (always last position).

    This is not currently supported. You can also submit a feature request for this at the link above.

    • Post Points: 20
  • 07-03-2008 7:04 In reply to

    Re: Add hyperlinks to a cell

     Thank you for your help. Applying the formula worked - but it wasn't so easy to define a dynamic link that also works when the location and filename of the workbook changes.

    =HYPERLINK(MID(CELL("filename",A1),FIND("[",CELL("filename",A1)),(FIND("]",CELL("filename",A1))+1)-FIND("[",CELL("filename",A1))) & "'Sheets2'!B1","Details")

     Cheers,

    Michael

     

    • Post Points: 20
  • 10-10-2008 0:29 In reply to

    Re: Add hyperlinks to a cell

    Hi Michael,

    This is my formula :   =HYPERLINK("c:\test\Doc1.doc","TEXT") 

    In excel it is displaying as =HYPERLINK("c:\test\Doc1.doc","TEXT") ,But Hyperlink is not coming, I have to enter "Press  Enter key"on every cell to get hyperlink.I want to dispaly hyperlink when ever I open excel,Please help me.

     

     

    • Post Points: 35
  • 10-10-2008 10:21 In reply to

    Re: Add hyperlinks to a cell

    This sounds like a bug. I would recommend submitting the issue to the support group: http://www.infragistics.com/gethelp.

    • Post Points: 5
  • 10-13-2008 3:51 In reply to

    Re: Add hyperlinks to a cell

     Hi praveen2660,

    you have to add the formula to the cell using the "ApplyFormula"-Method. In your caseWorksheet.Cells(0).ApplyFormula("=HYPERLINK(""c:\test\Doc1.doc"",""TEXT"")")

     Hope this helps!

    Cheers,

    Michael

    • Post Points: 5
Page 1 of 1 (6 items)
Powered by Community Server (Commercial Edition), by Telligent Systems