Home › Forums › HTBasic Forum › HTBDDE dll › Reply To: HTBDDE dll
Looks like some of the code got cut off. Here it is again.
OPTION BASE 1
DIM Data$(200,259)[20] ! Final array of data
DIM Lines$(200)[5180] ! 5180 is 259 values times max length of 20 each
DIM R$[5180] ! temporary comma delimited row string
DIM Col$(259)[20] ! temporary single row array of extracted column values
F$=”your folder path to data file”
ASSIGN @Samples TO F$&”\sample.csv”;FORMAT ON
ENTER @Samples;Lines$(*) ! get all 200 rows of data
ASSIGN @Samples TO *
FOR Row=1 TO 200
I=1
R$=Lines$(Row)
GOSUB Split ! get comma delimited data from R$ into Col$()
FOR Col=1 TO I ! 259
Data$(Row,Col)=Col$(Col) ! transfer to Data$
NEXT Col
NEXT Row
PRINT “Total: “;Total
GOTO Exit
Split: !extract comma delimited values from string
P=POS(R$,”,”)
IF P>0 AND P