$output = [ [ [0],[0],[0] ], [ [1,1,1],[1,1,1],[1,1,1] ], [ [2,2,2],[2,2,2],[2,2,2] ], [ [3,3,3],[3,3,3],[3,3,3] ], [ [4,4,4],[4,4,4],[4,4,4] ], [ [5,5,5],[5,5,5],[5,5,5] ], [ [6,6,6],[6,6,6],[6,6,6] ], [ [7,7,7],[7,7,7],[7,7,7] ], [ [8,8,8],[8,8,8],[8,8,8] ], [ [9,9,9],[9,9,9],[9,9,9] ], ]; #...other code that sets up the Excel sheet... my $Book = $Excel->Workbooks->Open("$excelfile"); for $i (1..9) { my $Sheet = $Book->Worksheets("$i"); $Sheet->Range("A1:C3")->{'Value'} = $$output[$i]; }