-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
null handling #32
Comments
Thank you for your contribution. Could you please provide a (small) example of an Excel that produce the bug? I could add it to the unit tests and fix the bug! |
When there are nulls values the null cells are skipped (or better missing) end the rest of the line is shifted to the left. |
I can not reproduce the problem. I tried this but it's OK (no bugs): $original_collection = collect([
['col1' => 'val1', 'col2' => 'val2'],
['col1' => null, 'col2' => 'val2'] // <= the "null" value is here.
]);
$filename = __DIR__ . '/test2.xlsx';
(new FastExcel($original_collection))->export($filename);
$res = (new FastExcel())->import($filename);
$this->assertEquals($original_collection, $res); // <= My unit test is green, success
unlink($filename); Could you paste a relevant part of your collection (thank you for your time!)? |
this is my example (full of nulls): |
Thank you! Fixed via b8f3fec, available in v0.4.0 (just update your version with composer and it should work!). Let me know if something went wrong! |
Also, I added a unit test with your case, thanks to you: fast-excel/tests/IssuesTest.php Lines 96 to 112 in dd31e83
|
It is fixed. You are super cool. |
Thank you! |
@rap2hpoutre I am using the latest nuget package and it seems this issue is happening again? |
I believe I am experiencing the same issue on version |
If in the first line of the outputted excel there is a null value then all columns are mixed up in the following lines.
Any suggestions?
The text was updated successfully, but these errors were encountered: