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

Free Support Forum - aspose.com

putValue (DateTime)


Can you please help me with following issue:

1) I can open Excel workbook and enter value “1:30” in cell. After this action cell will detected like "DateTime"
2) I can’t to put value into workbook via Aspose.Cells for automatic applying “DateTime” for cell.

public void dateTimeCells() throws Exception {
Workbook wb = new Workbook(“D://1.xlsx”);

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

assertEquals(CellValueType.IS_DATE_TIME, cells.get(“B3”).getType());

cells.get(“B5”).putValue(“1:30”, true);

assertEquals(CellValueType.IS_DATE_TIME, cells.get(“B5”).getType());


Thanks for the template file and sample code.

After an initial test, I observed the issue as you mentioned by using the following sample code. The DateTime type is not detected when adding a Date/Time value to a cell at runtime via Aspose.Cells.
Sample code:

Workbook wb = new Workbook(“1.xlsx”);

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

System.out.println(cells.get(“B3”).getType()); //Reads the value type - Ok

Date date=Calendar.getInstance().getTime();

System.out.println(cells.get(“B5”).getType()); //- Not Ok

I have logged a ticket with an id “CELLSJAVA-40880” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.


Thanks for using Aspose.Cells for Java.

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

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

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