We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel function NOW() is not working

Hello.

Ihave founded, that Excel’s function NOW() is not working (it returns time of last workbook saving). When i tried to calculate workbook without “ignoreError” flag, it thrown exception.

Can you please fix it

@Test
public void cdateTest() throws Exception {
Workbook wb = new Workbook(“D://in.xlsx”);

wb.calculateFormula(true);

Cells cells = wb.getWorksheets().get(0).getCells();

Cell cell = cells.get(“C4”);

System.out.println(cell.getDisplayStringValue());
}

@Test
public void cdateTest1() throws Exception {
Workbook wb = new Workbook(“D://in.xlsx”);

wb.calculateFormula();

Cells cells = wb.getWorksheets().get(0).getCells();

Cell cell = cells.get(“C4”);

System.out.println(cell.getDisplayStringValue());
}

Best regards. Alexey

Hi Alexey,

Thanks for your posting and using Aspose.Cells.

Please download and use the latest version: Aspose.Cells
for Java v8.2.2.2
, the code works perfectly with it.

I was not able to observe any issue. If your issue still persists, then please let us know your Locale settings, may be it is causing this issue.

With English locale, everything is ok

-Duser.language=en -Duser.country=US

Thanks for quick reply!


You are right. There is some issue with user.country, user.language. For me (ru-RU) it is not working, but with locale en-US it works. Is it possible to make this function non-locale-depended?

Best regards, Alexey

Hi Alexey,

Thanks for your feedback and using Aspose.Cells.

We were able to observe this issue after applying Russian settings. We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41083 - Excel function NOW() is not working in Russian setting

Hi,

Thanks for using Aspose.Cells for Java.

Please download and try this fix: Aspose.Cells for Java v8.2.2.3 and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-41083) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.