Guest User

Untitled

a guest
Nov 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. code to retrieve the values:
  2. def dbvalue= context["csvfile"] //csv file containing the data
  3. def count= context["dbrowcount"] //here the rowcount is 23
  4. for (i=0;i<count;i++)
  5. {def lines= ""
  6. lines= DBvalue.text.split('n')
  7. list<string> rows = lines.collect{it.split(';)}
  8. log.info "list is"+rows
  9. }
  10.  
  11. sample CSV file on which am working contains 600 column of data with 23 rows
  12. abc;null;1;2;3;5;8;null
  13. cdf;null;2;3;6;null;5;6
  14. hgf;null;null;null;jr;null;II
  15.  
  16. currently am code is fetching the below output:
  17. [[abc,null,1,2,3,5,8,null]]
  18. [[abc,null,1,2,3,5,8,null]]
  19. [[abc,null,1,2,3,5,8,null]]
  20.  
  21. desired output:
  22. [1,2,3,5,8]
  23. [2,3,6,5,6]
  24. [jr,II]
Add Comment
Please, Sign In to add comment