Hi,
We are using Aspose cell for JDK1.4 in our application. Aspose.Cells.jar version is quite older. I am not sure about it’s version, but in copyright message, it is showing (Copyright 2003 - 2010 Aspose Pty Ltd.).
We have a requirement to put multiple hyperlinks in one cell in excel sheet.
I used the following code to do that, but generated excel file shows first hyperlink only. Rest of the hyperlinks are ignored. I have attached generated excel file for reference.
Is there a way to achieve required functionality without using latest version of Aspose.Cells.jar because we want jars that can be used with JDK 1.4.
Code:
============================================================================
public static void main(String[] args) throws Exception
{
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.getWorksheets().getSheet(0);
int pictureIndex = worksheet.getPictures().add(2, 1, “D:\sweasy.jpg”, 40, 40);
Picture picture = worksheet.getPictures().get(pictureIndex);
picture.setLeft(10);
picture.addHyperlink(“http://www.google.com/”);
pictureIndex = worksheet.getPictures().add(2, 1, “D:\sweasy1.jpg”, 40, 40);
Picture picture1 = worksheet.getPictures().get(pictureIndex);
picture1.setLeft(40);
picture1.addHyperlink(“http://www.yahoo.com/”);
pictureIndex = worksheet.getPictures().add(2, 1, “D:\sweasy2.jpg”, 40, 40);
Picture picture2 = worksheet.getPictures().get(pictureIndex);
picture2.setLeft(70);
picture2.addHyperlink(“http://www.yahoo.com/”);
worksheet.getCells().setColumnWidth(1,14);
workbook.save(“D:\out1.xlsx”);
}
===========================================================================
Regards,
Ram Ochani.