Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] csv - v.toarray problem
#3
Here you go,

Please rename the attachment to test.csv. The attachment uploader won't let me upload csv.

Code:
Copy      Help
str s ss
ICsv v._create
v.FromFile("c:\test\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


Attached Files
.zip   test.zip (Size: 550 bytes / Downloads: 317)


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)