//SendToExcel.psc //Script to send data to excel if isfirstline then createfile('test.csv'); // global excel row counter y:=global1 inc(y); global1:=y; index:=global1; // for script designer s:=getioline; writetofile(s); { if pos('product',s)>0 then begin exceladd(1,1,s) end else if pos('Time',s)>0 then begin exceladd(2,1,s) end else begin // divide up x:=pos(',',s); number:=copy(s,1,x-1); delete(s,1,x); x:=pos(',',s); mytime:=copy(s,1,x-1); delete(s,1,x); x:=pos(',',s); weight:=copy(s,1,x-1); delete(s,1,x); x:=pos(',',s); quality:=copy(s,1,x-1); end; } if islastline then closefile; // for script designer inc(index); gotoline(index);