This is a migrated thread and some comments may be shown as answers.

Strange behavour of some DateTime cells in WorkSheet

2 Answers 21 Views
SpreadProcessing
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 26 Apr 2018, 11:55 AM

I am Importing a pretty simple Excel file with one date and two time columns (beside some other text and number columns).

I go trough the rows and columns of the used cell range to extract their values. Most of the Date and Time cells got the correct CellValueType number and the correct FormatType and FormatString. Some of them however come with a CellValueType.Text and a Value of "error" or "string". Actually 1 of 60 rows is affected where i can not retrieve the date and one of the two time cell values.

The strange thing here: Creating a Telerik.Web.Spreadsheet.Workbook from the Model.Workbook and adding the worksheet in question to a RadSpreadsheet the RadSpreadSheet will show no problems at all and all the cell formatting also is correct.

Now is there something fishy with the cell.GetValue()? And is there something i can do to hopefully avoid errors like that. Yes, i could just delete the row and add it again and maybe solve the problem for now. But i will keep the file as it is for Science.

2 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 01 May 2018, 10:52 AM
Hi Stefan,

This is the first time we encounter such a scenario and I performed a simple test using date values but couldn't reproduce a behavior similar to the described one. I suggest that it might be something related to the particular formatting or value applied to the cell. Can you please share how the file is created and how the values and their formats are applied? It would be great if you can send us a sample document which we can use to test. If you would like, you can open a support ticket where we can privately exchange .zip files.

Regards,
Tanya
Progress Telerik

0
Stefan
Top achievements
Rank 1
answered on 02 May 2018, 11:32 AM
A ticket has been opened.
Tags
SpreadProcessing
Asked by
Stefan
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Stefan
Top achievements
Rank 1
Share this question
or