use Spreadsheet::XLSX; my $excel = Spreadsheet::XLSX -> new ('/tmp/temp.xlsx'); print $excel; my @array; my $workbook = Excel::Writer::XLSX->new( 'perl.xlsx' ); #my $FILENAME="/tmp/Newfile.xls"; my $workbook = Spreadsheet::WriteExcel->new("$FILENAME"); my $worksheet1=$workbook->addworksheet("Worksheet1"); $worksheet1->write( "A1", "Hi Excel!" ); foreach my $sheet (@{$excel -> {Worksheet}}) { printf("Sheet: %s\n", $sheet->{Name}); $sheet -> {MaxRow} ||= $sheet -> {MinRow}; foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { $sheet -> {MaxCol} ||= $sheet -> {MinCol}; foreach my $col ($sheet -> {MinCol} .. $sheet -> {MaxCol}) { my $cell = $sheet -> {Cells} [$row] [$col]; if ($cell) { printf("( %s , %s ) => %s\n", $row, $col, $cell -> {Val}); my $temp=$cell->{Val}; $worksheet1->write($row,$col,$cell -> {Val}); # push(@array,$temp); # $sheet->write($row,$col,"CHECK"); } } } last