Quantcast
Channel: npoi Discussions Rss Feed
Viewing all articles
Browse latest Browse all 637

New Post: Hyperlinks worked, then quit working...

$
0
0
Using current version of NPOI under Win7 64-bit, VS2013.

My program worked great (under 4.5.1), I was able to add a hyperlink to a directory that brought up Windows Explorer in a newly-created directory. The DLLs I used were in a directory called 'dotnet2'.

Then I realized the target machines would not have .NET 4.5.1, probably only 2.0, so I created a new project, copied my source over, added the references to 'dotnet2' NPOI DLLs.

Now my cell has the hyperlink style, but there is no hyperlink to the directory, and the mouse pointer does not change. When debugging, everything seems to go correctly.

Here's a code snippet; does anything look incorrect?
ICell cmdLineCell = row.GetCell(4);
cmdLineCell.SetCellValue(fullPath);

string uriDir = Path.GetDirectoryName(fullPath);
Uri linkAddr = new Uri(uriDir);

try
{
    link.Address = (linkAddr.AbsoluteUri);
    cmdLineCell.Hyperlink = (link);
    cmdLineCell.CellStyle = (hlink_style);
}
catch (Exception)
{
    Console.WriteLine("******* ERROR CREATING HYPERLINK *********");
}

Viewing all articles
Browse latest Browse all 637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>