Originally Posted by
parkerfeldman
hi i have a routine that is reading from a excel csv file and writing it to a list. but it gets stuck when reading 4 cells that each contain feet and inches (ex: 10'-6") and converts them to a real using atof. it reads other strings without converting them to real numbers with no problem. in the below routine. j is already preset as 8. so in the command line it prints out "C" then it freezes then when i exit the routine "9101112" will show up. is it getting stuck in this repeat? i dont understand. i printed the (length dlst) and it returned 4 so it should exit the repeat. the parse function reads stri1 which is a line in the excel file and dcode is a comma so in the parse function it is reading the excel file until it encounters a comma and j represents how many times it does that. so that determines what cell. please help me!
(princ "C")
(terpri)
(repeat (length dlst)
(setq j (1+ j))
(PRINC j)
(setq nam (parse stri dcode j))
(setq val (atof (parse stri1 dcode j)))
(setq nvp (cons nam (list val)))
(if (/= dstr nil)
(setq dstr (append dstr (list nvp)))
(setq dstr (list nvp))
)
) ;end repeat
(terpri)
(princ "D")