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

During import... Undefined variable: fileHandle #37

Closed
bruceoutdoors opened this issue Mar 3, 2014 · 3 comments
Closed

During import... Undefined variable: fileHandle #37

bruceoutdoors opened this issue Mar 3, 2014 · 3 comments

Comments

@bruceoutdoors
Copy link

I tried a simple piece of code:

Route::get('excel-import', function() {
    $path = public_path() . '\members.csv';
    Excel::load($path)->dump();
});

And Laravel 4.1 tells me this:

ErrorException: Undefined variable: fileHandle

It pin point me to \vendor\phpoffice\phpexcel\Classes\PHPExcel\Reader\CSV.php which I fixed the error by changing line 147:

rewind($fileHandle);

to

rewind($this->_fileHandle);

Tada! problem fixed.

@MaatwebsiteSupport
Copy link
Contributor

Hey

Thanks for sending in this issue.

I see it's an issue with the 1.7.9 of phpExcel version, I see your fixe is inside 1.8.0, but first have to test it tomorrow morning before I update the composer.json.

@mewben
Copy link
Contributor

mewben commented Mar 6, 2014

The fix above worked for me too... 👍

@ashawkat
Copy link

ashawkat commented Mar 6, 2014

I've tried to import an xls file but unable to import it. Is there any way to import xls or xlsx llike csv upload?

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

No branches or pull requests

4 participants