We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

When cells get user-defined format, System.NullReferenceException occurs.

Hello.

Please tell me why When cells get user-defined format, System.NullReferenceException occurs.

I think maybe because the double-byte characters are used in user-defined, how to read what's not in this case?



XlsIO_test_7715fb07.zip

7 Replies

MP Manimala P Syncfusion Team December 30, 2009 12:43 PM UTC

Hi Daiki,

Thank you for your interest in Syncfusion products.

You can use the following code snippet to resolve the mentioned issue.

DateTime result = DateTime.Parse(sheet.Range["A1"].Value);
textBox1.Text = result.ToShortDateString();

Please let me know if you have any questions.

Regards,
Manimala.


DG Daiki Goto January 12, 2010 01:02 AM UTC

sheet.Range["A1"] <== 'System.NullReferenceException'


DG Daiki Goto January 12, 2010 01:43 AM UTC

I'm using Microsoft Office Japanese version.
This is a user-defined type [m"月"d"日"] occurs if you have specified.


MP Manimala P Syncfusion Team January 12, 2010 10:37 AM UTC

Hi Daiki,

This issue is confirmed as a defect.Please follow up with incident #63206 for more details.

Please let me know if you have any questions.

Regards,
Manimala.


DG Daiki Goto February 8, 2010 01:55 AM UTC

Thanks for the update.
Certainly exception no longer occurs. However, the user-defined format [m "Mon" d "Sun"] If it is, DisplayText is [m Mon d,] and I should be displayed, [m "Mon" d "Sun"] and will appear. (A waste "would be displayed.)


DG Daiki Goto February 8, 2010 01:57 AM UTC

Sorry.Previous post is incorrect.

Thanks for the update.
Certainly exception no longer occurs.
However, the user-defined format [m"月"d"日"] If it is, DisplayText is [m月d日] and I should be displayed, [m"月"d"日"] and will appear. (A waste ["] would be displayed.)


MP Manimala P Syncfusion Team February 12, 2010 12:44 PM UTC

Hi Daiki,

Thanks for the update.Could you please provide me the clear requirements about the date format which you want to display.

Please let us know if you have any other queries.

Regards,
Manimala.

Loader.
Live Chat Icon For mobile
Up arrow icon