tags:

views:

138

answers:

1

Hi all, I'm using the following code to create an xls file from php.

http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8

However, for some reason if the row "comments" is more than 255 characters, it doesn't output anything..

The code which writes the String to the XLS file is:

function xlsWriteString( $Row, $Col, $Value ) {
    $L = strlen( $Value );
    echo pack( "ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L );
    echo $Value;
return;
};

Could someone help me get this to display the field regardless of how many characters are in the string?

Thanks

EDIT: I found this: http://support.microsoft.com/kb/213841 but not sure how to implement the work around into php..

ANOTHER EDIT: Even if anyone knows how to merge cells? That would also work?? :)

+1  A: 

Sounds like it may be related to this issue.

ceejayoz
Hmmm I'm using office 2007.. but doesn't say that it's applied to that version? When I try to open the excel file, it gives me an error saying some data has been lost.. and the field comments is blank if it's got more than 255 characters..
SoulieBaby