I am using NOPI to generate Excel files and I am adding images to the Excel using the following code:
//the drawing patriarch will hold the anchor and the master information
HSSFPatriarch patriarch = (HSSFPatriarch)sheet.CreateDrawingPatriarch();
//store the coordinates of which cell and where in the cell the image goes
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, 0, startRow, 1, startRow + 1);
//types are 0, 2, and 3. 0 resizes within the cell, 2 doesn't
anchor.AnchorType = 2;
var webClient = new WebClient();
byte[] imageBytes = webClient.DownloadData(GetProductImage(manufacturerId, photoName));
//add the byte array and encode it for the excel file
int index = hssfworkbook.AddPicture(imageBytes, PictureType.JPEG);
HSSFPicture signaturePicture = (HSSFPicture)patriarch.CreatePicture(anchor, index);
This is working well but I now also need to add a link to those images so users can download larger versions.
Anyone able to accomplish this?