my @TEMP; sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; if ($sheet_index == 1) { $TEMP[$row][$col] = $cell; } elsif ($sheet_index == 2) { print $TEMP[$row][$col]->value(),"\n"; print $cell->value(),"\n"; } }