#set columns A through D $xWS2->set_column( 'A:D', 20 ); # Add column headers for first worksheet my $R = 0; my $C = 0; $xWS->write( $R, $C++, $_ ) for 'A' .. 'Z'; # Read the query results and write them into the spreadsheet for ( 1 .. 26 ) { ++$R; $C = 0; $xWS->write( $R, $C++, $_ ); }