http://www.perlmonks.org?node_id=761576


in reply to Re^2: Why Does the Module(s) Round off to 2 Decimal Places?
in thread Why Does the Module(s) Round off to 2 Decimal Places?

Below is my changed code, which tests fine for me. I also had to add a "Use Spreadsheet::XLSX" to the top of Spreadsheet::XLSX::Utility2007, and, for some reason I don't understand, had to change line 136 of Spreadsheet::XLSX::Fmt2007 to "return Spreadsheet::XLSX::Utility2007::ExcelFmt($sFmtStr, $Dt, $Flg1904, $oCell->{Type});"

if( !$rotate) { for( my $y = $y1 ; $y <= $y2 ; $y++) { for( my $x = $x1 ; $x <= $x2 ; $x++) { my $cell = $oWkS->{Cells}[$y][$x] ; #$output .= $cell->Value if(defined $cell); $output .= $cell->{Val} if(defined $cell); $output .= "," if( $x != $x2) ; } $output .= "\n" ; } } else { for( my $x = $x1 ; $x <= $x2 ; $x++) { for( my $y = $y1 ; $y <= $y2 ; $y++) { my $cell = $oWkS->{Cells}[$y][$x] ; #$output .= $cell->Value if(defined $cell); $output .= $cell->{Val} if(defined $cell); $output .= "," if( $y != $y2) ; } $output .= "\n" ; } }