02-26-2014, 10:26 AM
k. I tried doing that, but now the macro breaks after outputting "line1"
There's an error with this line "out a[r c]" near the bottom <-------- Error (RT) in reading csv - getting help in forum: invalid index. ?
Here's the code
Macro reading csv - getting help in forum
There's an error with this line "out a[r c]" near the bottom <-------- Error (RT) in reading csv - getting help in forum: invalid index. ?
Here's the code
Macro reading csv - getting help in forum
str s ss
s=
;line1
;line2
;line3
;line4
s.setfile("$temp qm$\test.csv")
ICsv v._create
v.FromFile("$temp qm$\test.csv")
int nr=v.RowCount
int nc=v.ColumnCount
int r c
for r 0 nr
,;out "--- row %i ---" r
,for c 0 nc
,,s=v.Cell(r c)
,,;out s
v.ToString(ss)
;out ss
;v.ToArray(ARRAY(str)*a) Error in Macro: ARRAY variable cannot be declared inline.
ARRAY(str) a.create(nc nr)
v.ToArray(a)
for r 0 nr
,;out "--- row %i ---" r
,for c 0 nc
,,out a[r c]
,,;out s