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
No ReaderType or WriterType could be detected #2201
Comments
Thanks for submitting the ticket. Unfortunately the information you provided is incomplete. We need to know which version you use and how to reproduce it. Please include code examples. Before we can pick it up, please check (https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/.github/ISSUE_TEMPLATE.md) and add the missing information. To make processing of this ticket a lot easier, please make sure to check (https://laravel-excel.maatwebsite.nl/3.1/getting-started/contributing.html) and double-check if you have filled in the issue template correctly. This will allow us to pick up your ticket more efficiently. Issues that follow the guidelines correctly will get priority over other issues. |
I think the exception message is pretty clear. Make sure that it has an extension, or be explicit and pass a writer/reader type. |
Error has resolved. I was sending a wrong file path to import. |
Glad to hear your issue has been resolved. Thank you for using Laravel Excel! |
Same error i am also facing, can you tell where you have mention the file path. since i am using getRealPath() to get the upload file and directly using the Excel::import |
Thanks.. i solved the issue, by the same way you mention |
can anyone help me out with this issue `No ReaderType or WriterType could be detected. Make sure you either pass a valid extension to the filename or pass an explicit type. |
Please create a new ticket with the issue template filled. The issue template is required for us to be able to help you and is automatically available for you when opening a new issue, please do not remove the contents of the issue template. |
can anyone help me how to upload utf-8 csv file . i am facing with like this error : Maatwebsite \ Excel \ Exceptions \ NoTypeDetectedException |
Same error i am also facing, can you tell where you have mention the file path. since i am using getRealPath() to get the upload file and directly using the Excel::import |
That won’t work, real path doesn’t have an extension so we can’t guess the reader type. Pass the uploaded file instance or the reader type explicitly |
The issue is the getRealPath() instead of store it into a temp , get that path, and send it to the import function
|
You can just pass the uploaded file: |
If you are on Cent OS, it stores temp file without extension. So just rename a temp file and add a My code like below is working :
|
As a complement: If nothing works. You should verify your HTML form enctype attribute like that: or like that: you have to include this enctype or it will cause the following error:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
can you share here. what you have done? |
@edocollado thanks,I'm careless |
could you share your code please? i have a same problem and couldnt find the answe yet :( |
It worked for me |
this worked for me, thanks. |
Already solved that error
…On Fri, 22 Sep, 2023, 10:19 am Eric Locop, ***@***.***> wrote:
If you are on Cent OS, it stores temp file without extension. So just
rename a temp file and add a tmp extension.
My code like below is working :
$tmpfname = request()->file('userfile')->getPathName();
rename($tmpfname, $tmpfname .= '.tmp');
this worked for me, thanks.
—
Reply to this email directly, view it on GitHub
<#2201 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXV4I3DOIYHDYKW3MZG4OJTX3UKHNANCNFSM4HN7PFFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I am getting this issue on excel file import on web server. But this is working fine on local server.
Maatwebsite \ Excel \ Exceptions \ NoTypeDetectedException
No ReaderType or WriterType could be detected. Make sure you either pass a valid extension to the filename or pass an explicit type.
Please help to resolve this issue.
The text was updated successfully, but these errors were encountered: