Winforms, Datagrids, Hyperlinks and Excel
-
Hello, I hope someone can help with this problem. I'm working on an app which reads the company database for a range of scanned images according to user and date. It retrieves a list of all relevant scans and displays the results in a datagrid, date scanned, image location etc. The image is not displayed. When I hit the Export button, the 'grid is made into an Excel spreadsheet and all the images downloaded locally. I need the image location column of the spreadsheet to be a relative hyperlink to the local copy of the images that were downloaded. I can go into the spreadsheet and manually turn every link into a hyperlink which is OK when the result set is only a few lines but there could be hundreds of rows potentially. I want to be able to do it programatically. Any ideas? I've messed about with the text in the spreadsheet as it is written with things like xl.Cells[rowIndex + 1, 5] = "/images/" + filename.Substring(45, 10) + ".jpg"; trying to turn it into a relative link this way but no dice. Any ideas please, as I'm stumped. Thanks in advance and Merry Christmas to everyone Scott scotlandc