Hyperlink to a different sheet in the same work book

Topics: Developer Forum, Project Management Forum, User Forum
Dec 23, 2009 at 4:03 PM
Edited Dec 23, 2009 at 8:46 PM

hi,

i am able to create an hyperlink but how can we point the hyperlink to a different sheet in the same workbook?i am trying to do this with the following code:

                string hyperlink = "c://poc/sample1.xlsx";
                
                worksheet.Cell(2, 1).Hyperlink = new Uri(hyperlink, UriKind.Absolute);

how can point the hyperlink to c://poc/sample1.xlsx-sheet2!A2

can some one help me with this?

 

 

Jan 5, 2010 at 10:00 PM
<abbr></abbr>

<input id="ctl00_ctl00_MasterContent_Content_PostRepeater_ctl02_PostId" name="ctl00$ctl00$MasterContent$Content$PostRepeater$ctl02$PostId" type="hidden" value="273498" />

 figured out how to do it...

 

string hyperlink = (@"file:///c:\poc\sample1.xlsx#'Sheet2'!A1");

worksheet.Cell(row,column).Hyperlink = new Uri(hyperlink, UriKind.RelativeOrAbsolute);

 

this is the code!!!