get Value In Spread

Posted by: zxx2403 on 8 September 2017, 12:42 pm EST

  • Posted 8 September 2017, 12:42 pm EST

    I get the value of Cell as follow


    But  if  the Cell not have been assigned value.

    The .net will throw a Exception

    How I can Do .

    give me a example


       thank you

  • Replied 8 September 2017, 12:42 pm EST


    The ToString method will throw an exception if it is called on a null object. You need to check to make sure the Value is not null before calling the ToString method.

    <SPAN class=kwd>if</SPAN>(Spread1.ActiveSpread.Cells.Get(0,2).Value!=<SPAN class=kwd>null</SPAN>)
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels