% % cycle through all entries past the raw seed % { "RawSum" File.DirNext isnull ? % % is the next data point valid % *gwizqcnu { % % valid data point, groom the data point actual time of collection % the time and date supplied by machine is probably off % dup stamp _ldate second "s" Time.Diff dup unwhole { "offdate " &4 log)( } if pop !ldate % % use first Tcount if not yet init % _pcount zero { _Telm.Tcount !pcount } if % % load the csv for the data point % *gwizxcsw *gwizsumt } if pop } loop "RawSum" File.DirClose pop % % summarize the current date by processing with tomorrow's date % no summary for tomorrow will appear % _ldate dated !Raw.Dated _ldate Time.Now "d" Time.Diff zero { % % this is today's summary last processed % save the all-but-today builder summary % _builder "_rawsun" text!conn } { % % today was not last date processed % } ifelse Time.Now 1 "d" Time.Add !ldate *gwizsumt % % write the raw summary list % _builder "_rawsum" text!conn _Raw.Dated "_rawsum" conntext % % load the list of dates/qty in current worksheet % _Raw.Area "Summed" @Xls @^xlRunF3