Excel date formatting and string value are lost when we convert to Aspose cell

Hi

I am trying to convert dates from excel cells to a word via Aspose.cells. The issue that I find is concerning some date format, the aspose loose the original value and return the date with another formatting. For other cases, the value is correct but the date formatting is lost (aspose.style.custom = empty string).

I’ve attached a simple WinForm application that make the conversion. To run the application, you have to copy the Book1.xlsx to C:/. Once the application is running, write the cell name (ex A1) on the first textbox and click on the button.
Keep the Excel file open to see the difference between the excel value and aspose value.

the value in the cells A1 and A2 are modified by Aspose. Ex:

  • A1 value in excel is ‘A’ using the date formatting ‘M’. However, in Aspose the value is ‘April’ and the formatting is ‘mmmmm@’.

In the cells A4, A5, A6 and A7, aspose is returning the correct original string value. However in some of them, the date formatting string (aspose.style.custom) is lost.

Thanks for the help,

Hi,

I think, you are right, because the value in cell A1 is

04-03-2009 2:08:22 PM

and you have set the custom format M, which means month. And the month is April i.e 04, so it shows April.

And also Ms-Excel shows A because April starts from ‘A’.

It seems, Aspose.Cells should display the same value as Ms-Excel, so I have logged this bug in our database.

We will look into this issue and fix the problem asap.

This issue has been logged as CELLSNET-40216.

Could you check also another issue. In some of the cases if the excel sheet, the date formatting is lost. In aspose.cells.style.custom we got empty string.

thanks

Hi,

For your issue of ‘A’ for formatting “April”, we need to rebuild our value-to-string logics of formatting cells to support such kind of non built-in patterns. We have put this task into our plan for the next year, but we are afraid we cannot finish it very soon.

For the issue of A4-A7 cells, they are using Excel’s built-in formatting, so please use Style.Number accordingly instead of Style.Custom to get the built-in formatting number.

Thank you.

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


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