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
close icon

Setting a cell value

Hi,

I want to set a cell value, and it would be handy if there was a property where I could set the value, and it would detect automatically the .NET object type. I.e. I have a bunch of objects, strings, datetimes, integers, and I want to assign them to cells. Now when setting IRange.Value or Value2, XlsIO detects the type based on the format, not based on the .NET type. Could you guys add a property where XlsIO detects the object type and assigns an appropriate cell format? So if I assign a string to a cell, even if it contains a number like "00343", it would detect to use the string format (and not the number format).

Best regards,

Wout


4 Replies

WD Wout de Zeeuw February 25, 2009 09:05 AM UTC

Note that IRange.Value2 doesn't seem to work, even though from the documentation it seems to be the property that should be doing the job.

E.g. if I assign "00123" (string) to IRange.Value2, it gets converted to a number, even though I'd expect it to be a string.

XlsIO version: 7.102.0.21

Thanks,

Wout




GM Geetha M Syncfusion Team February 25, 2009 02:37 PM UTC

Hi Wout,

Thank you for the details.

The issue of Value2 property does not detects object type based on type is suspected to be a defect and has been forwarded to our development team for more analysis. I will update you the status of the same in two days.

Please let me know if you have any questions.

Regards,
Geetha



WD Wout de Zeeuw April 23, 2009 11:46 AM UTC

Hi Geetha,

Any progress on this?

Thanks,

Wout



GM Geetha M Syncfusion Team April 24, 2009 06:49 AM UTC

Hi Wout,

Sorry for the delay in responding you.

As per design, the Value 2 property currently checks for the following data type:

DateTime, TimeSpan, Double and Integer

When a string is passed, the Value property is called and the object is parsed and get the Number value. I have created a Feature Request on this regard and will update you once it gets implemented.

Please let me know if you have any questions.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon