Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String being truncated while reading a big file #142

Open
GoogleCodeExporter opened this issue Jul 24, 2015 · 4 comments
Open

String being truncated while reading a big file #142

GoogleCodeExporter opened this issue Jul 24, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Hello

I'm sorry, I can't attach a file that causes a bug because of some company 
policies forbid it.
I found that the bug might be near the the line 1108.

$newstr = '';
for ($j = 0; $j < strlen($retstr); $j++) {
     $newstr = $retstr[$j].chr(0);
}
$retstr = $newstr;

I really not an expert in excel's inner file format, but I think that this code 
will truncate the string inside the $retstr variable.
I replaced the 
$newstr =  $retstr[$j].chr(0);
with
$newstr .=  $retstr[$j].chr(0);

and now everything works as it should be (at least it looks like that).

Thank you.

Dmitry.

Original issue reported on code.google.com by [email protected] on 21 Feb 2012 at 3:27

@GoogleCodeExporter
Copy link
Author

Thank you so much, Dmitry, I was facing same issue, which is resolved now 
thanks to your comment.

Original comment by [email protected] on 22 Feb 2012 at 12:32

@GoogleCodeExporter
Copy link
Author

I have this issue too but changing the line in the code made no difference.  In 
my original 2806 line 20 column file looping through the first row columns with 

$data ->val (1, $col) truncated each string by an apparently random ammount.

lopping off all but the first four rows it's fine.  Any suggestions?

Original comment by [email protected] on 13 Nov 2012 at 3:26

@GoogleCodeExporter
Copy link
Author

Can you post a  file for me to test on?

Original comment by [email protected] on 13 Nov 2012 at 4:10

@GoogleCodeExporter
Copy link
Author

Here's the file.


Original comment by [email protected] on 13 Nov 2012 at 5:58

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant