Forum Discussion

nish1's avatar
nish1
Occasional Contributor
11 years ago

Can not insert as a XL sheet variable

Hi,



When I'm trying to insert text to Delphi combo box from XL sheet  variable, it says eception - parameter is incorrect and through me out.



But the same was hard-coded it works.

If I define same as a normal(testcompleate) variable it works.



 do anybody knows what I have done wrong



regards

\Nish

4 Replies

  • sastowe's avatar
    sastowe
    Super Contributor
    In debug mode, put  abreakpoint and set a watch for Variables.AnnualXL("ItemsToInput")



    See what is stored there. If I had to guess, I would guess that the ItemsToInput element does not exist.
  • nish1's avatar
    nish1
    Occasional Contributor
    Hi,

    The problem is that it is a type "Date" in XL eg- 01/05/2013 

    when reading from XL try to convert to text or Genaral format.

    In which returns XL default text ....



    is there any idea to overcome this?

    regards

    \Nishantha.
  • I'm not very familiar with Keyword tests so I'm not sure if this will work, but you could try adding a Run Code Snippet node that would read in the XL variable and convert it back into a date:



    aqConvert.StrToDate(Variables.AnnualXL("ItemstoInput"))



    More on aqConvert: aqConvert Object
  • nish1's avatar
    nish1
    Occasional Contributor
    Hi, 

    It dosen't work.

    Think the problem is while reading XL, Testcompleate try to convert to text not after.

     I found work around but not reliable - not work allways

    adding another column in XL and convert date to text using XL "TEXT()" funtion.

    But it does not work allways.

    regards

    \Nishantha.