use strict; use Win32::OLE; my $rowCount = 10000; my $colCount = 10; print "Build array\n"; my @data; for my $row (0..$rowCount) { for my $col (0..$colCount) { $data[$row][$col] = "Row: $row, Col: $col"; }; }; print "Open Excel\n"; my $app = Win32::OLE->new('Excel.Application'); my $book = $app->Workbooks->Add; my $sheet = $book-> Worksheets->Add; my $cell = $sheet->Range('A1'); $app->{Visible} = 1; print "Copy array to Excel\n"; $sheet->Range($cell, $cell->offset($rowCount, $colCount))->{Value} = \@data; print "Format\n"; my $red = 0x0000FF; my $green = 0x00FF00; my $blue = 0xFF0000; my $yellow = 0x00FFFF; $cell->EntireColumn->Font->{Bold} = 1; $cell->EntireColumn->Font->{Italic} = 1; $cell->EntireColumn->Interior->{Color} = $yellow;