Skip to content
Permalink
Browse files

More explicit byte-order of strings to make it work on non-Intel mach…

…ines
  • Loading branch information...
moodler
moodler committed Jun 8, 2003
1 parent f065b63 commit f207d09a64e8eaa067e1be467f24a7d6c0e5c94e
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/psxlsgen.php
@@ -54,7 +54,7 @@ function PhpSimpleXlsGen()
$this->dirsep = "/";
}
// begin of the excel file header
$this->xls_data = pack( "ssssss", 0x809, 0x08, 0x00,0x10, 0x0, 0x0 );
$this->xls_data = pack( "vvvvvv", 0x809, 0x08, 0x00,0x10, 0x0, 0x0 );
// check header text
if ( $this->header ) {
$this->Header();
@@ -76,15 +76,15 @@ function Header( $text="" ) {
// end of the excel file
function End()
{
$this->xls_data .= pack("sssssssC", 0x7D, 11, 3, 4, 25600,0,0,0);
$this->xls_data .= pack("vvvvvvvC", 0x7D, 11, 3, 4, 25600,0,0,0);
$this->xls_data .= pack( "ss", 0x0A, 0x00 );
return;
}
// 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( "vvvvv", 0x0203, 14, $row, $col, 0x00 );
$this->xls_data .= pack( "d", $value );
return;
}

0 comments on commit f207d09

Please sign in to comment.
You can’t perform that action at this time.