### build a whole bunch of data like below... my $defects = Dashboard::safeSQLfunction( "SELECT COUNT(*) FROM userProcessLists WHERE masterID = ? AND EVpoints > 0 AND ((start IS NULL) OR (finish IS NULL))", $ref->{'processID'}); # and store it $worksheet->Range("A$row:N$row")->{Value} = [ $poc, $project, $code, $process, $evp, $overallPercentage, $start, $finish, $duration, $lastDone, $lastCompletionDate, $dollars, $staff, $defects, ]; } ## end while (my $ref = $sth->fetchrow_hashref)