Hi,
I think this one is different from the other one I have just posted: public void test_aspose() {<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
String filePath = "Aspose_BUG.xlsx";
Workbook workbook;
try {
workbook = new Workbook(filePath);
workbook.calculateFormula();
Worksheet sheet = workbook.getWorksheets().get(2);
System.out.println("Name of sheet : " + sheet.getName());
// sheet.calculateFormula(true, true, null);
for (int i = 1; i < 5; i++) {
System.out.print(sheet.getCells().get("A" + i).getDisplayStringValue() + " - ");
System.out.print(sheet.getCells().get("B" + i).getDisplayStringValue() + " - ");
System.out.print(sheet.getCells().get("C" + i).getDisplayStringValue() + " - ");
System.out.print(sheet.getCells().get("D" + i).getDisplayStringValue() + " - ");
System.out.print(sheet.getCells().get("E" + i).getDisplayStringValue() + " - ");
System.out.print(sheet.getCells().get("F" + i).getDisplayStringValue() + " - ");
System.out.println(sheet.getCells().get("G" + i).getDisplayStringValue() + " - ");
}
System.out.println();
} catch (Exception e) {
e.printStackTrace();
}
}
The result is:
Name of sheet : Yearly
Date - Rank - - - - - -
30/06/2012 - 1 - 24,382,369.37 - 24,382,369.37 - - - - - 2.03 -
6/30/2013 - 2 - 12,534,030.83 - 12,534,030.83 - 11,848,338.54 - 11,848,338.54 - 1.03 -
6/30/2014 - 3 - 12,534,030.83 - 12,534,030.83 - - - - - 1.00 -
But the Excel sheet is different.
Date |
Rank |
|
|
|
|
|
30/06/2012 |
1 |
301,728,600.71 |
301,728,600.71 |
- |
- |
12.59 |
30/06/13 |
2 |
289,880,262.17 |
289,880,262.17 |
11,848,338.54 |
11,848,338.54 |
11.59 |
30/06/14 |
3 |
277,681,378.91 |
277,681,378.91 |
12,198,883.26 |
12,198,883.26 |
11.06 |
Kindly requesting you to have a look at this issue.
Regards
VR