Menu

Unable to Read File Fix for .3

Help
Cesar Ho
2001-07-26
2013-04-09
  • Cesar Ho

    Cesar Ho - 2001-07-26

    Find these functions and replace the code with
    the previous code:

         // insert a number, increment row,col automatically
         function InsertNumber( $value )
         {
            if ( $this->ccol == $this->totalcol ) {
               $this->ccol = 0;
               $this->crow++;
            }
            $this->WriteNumber_pos( $this->crow, $this->ccol, &$value );
            $this->ccol++;
            return;
         }

         // insert a number, increment row,col automatically
         function InsertText( $value )
         {
            if ( $this->ccol == $this->totalcol ) {
               $this->ccol = 0;
               $this->crow++;
            }
            $this->WriteText_pos( $this->crow, $this->ccol, &$value );
            $this->ccol++;
            return;
         }

     
    • Cesar Ho

      Cesar Ho - 2001-07-26

      Whoops, wrong functions =)

           // write a Number (double) into row, col
           function WriteNumber_pos( $row, $col, $value )
           {
              $this->xls_data .= pack( "sssss", 0x0203, 14, $row, $col, 0x00 );
              $this->xls_data .= pack( "d", $value );
              return;
           }

           // write a label (text) into Row, Col
           function WriteText_pos( $row, $col, $value )
           {
              $len = strlen( $value );
              $this->xls_data .= pack( "s*", 0x0204, 8 + $len, $row, $col, 0x00, $len );
              $this->xls_data .= $value;
              return;
           }

       
      • Martin Dougiamas

        That works for me! 

        Cheers!
        Martin

         
    • Eric Werbeck

      Eric Werbeck - 2005-08-30

      Thanks man.

       

Log in to post a comment.