Skip to Content
avatar image
Former Member

VC 7.1.1 - Excel Simulated Service and Drop Down

Hello,

I have created the Simulated Service using Excel - data being Km (0 to 300), when using the drop down, the number is not converted to text, on RT, the display should be 1 instead it is 1.0.....

any pointers?

Thanks much,

Dharmi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 10, 2008 at 02:02 PM

    Hi Dharmi,

    I can suggest 2 ways to do that:

    1. Rebuild your service, only this time make sure that the excel cells (that hold the km in your case) are formatted as TEXT. you can use this screenshot to clear it out: http://www.box.net/shared/nqh7dyvx44

    Then when you paste it in the service component wizard it will automatically be translated to String type.

    2. If you do not want to rebuild your service, do the following:

    open the service component

    add a text field on the out port

    map the numeric field to the text field on the line connected to the signal out

    outside of the service component, use the text field instead of the numeric one.

    I believe that the convertion is created automatically, else you can use the dynamic expression editor with the NSTR(number) function.

    In you model you can always convert numbers to text and vise versa using NSTR() and NVAL()

    I hope that will solve your issue

    Regards

    Yogev

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Yogev,

      Thank you for your response. I did do both the steps you mentioned, but the result was same "1.0" , so I used a replace statement to solve it.

      Best regards,

      Dharmi

  • avatar image
    Former Member
    Nov 11, 2008 at 05:54 AM

    Hi,

    I solved it using replace statement

    Add comment
    10|10000 characters needed characters exceeded