Hello,
I open a workbook with aspose, and I try to get the value in a cell where there is an hyperlink.
When the workbook is saved in xls format, there is no problem when it is opened and I get the cell value.
But, when I save the workbook in xml format, and open it with the open(fileName, FileFormatType.SPREADSHEETML) command, the cell.getValue() command does not work properly.
Here is a sample of my test code.
public static void main(String[] args) throws AsposeLicenseException, IOException {
License license = new License();
license.setLicense(new FileInputStream(“ressource/Aspose.Cells.lic”));
Workbook xlsWb = new Workbook();
xlsWb.open(“XLFiles/TestHyperlink.xls”);
Workbook xmlWb = new Workbook();
xmlWb.open(“XLFiles/TestHyperlink.xml”, FileFormatType.SPREADSHEETML);
Cell cell1 = xmlWb.getWorksheets().getSheet(0).getCells().getCell(“C2”);
System.out.println(cell1.getValue());
Cell cell2 = xlsWb.getWorksheets().getSheet(0).getCells().getCell(“C2”);
System.out.println(cell2.getValue());
}
Thank you,
Regards.