Forum Discussion

shankar_r's avatar
shankar_r
Community Hero
9 years ago

DDT driver not reading Excel cell values with Carriage Return character?

DDT driver not reading Excel cell values with Carriage Return character.

 

Or is there any way to get the cell values with the Carriage Return character.

 

If i get any quick answer that would be great help.

  • tristaanogre's avatar
    tristaanogre
    9 years ago

    I was right... in the Excel cell, what is separating the lines is not a CR but an LF only... so, in other words, your code should be

     

    aqString.ListSeparator = "\n"
    aqString.GetListItem(mycellvalue,0);

    This worked for me... see if it works for you.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Can you describe how you are entering the carriage return into the cell?  I've attempted to do so by using ALT-ENTER within a cell and what I get does return a string with multiple lines. 

     

    • shankar_r's avatar
      shankar_r
      Community Hero

      You are right, I got the value.

       

      If  i want to split the value by carriage return(New Line) how can i do that?

      • shankar_r's avatar
        shankar_r
        Community Hero

        Using Javascript i tire the below options,

         

        1)

        mycellvalue.split("\r\n")

         

        2)

        var testRE = RegExp("\r\n");

        mycellvalue.split(testR)

         

        3)

        mycellvalue.split(chr(13);

         

        nothing is working for me..