Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 4 years, 8 months ago. Active 4 years, 8 months ago. Viewed 1k times. Improve this question. Instead of doing this in JSP do it in servlet, JSP is using character writer for dynamically generating HTML instead of binary output stream which will corrupt your excel file stackoverflow.
Add a comment. Active Oldest Votes. Check this code it will help.. Thanks again. Additional menu Are you unable to open a downloaded excel sheet on your computer? Sambit Koley. Comments Excel will not open a file from the folder it was save in…. Leave a Reply Cancel reply Your email address will not be published. While working with Excel, you may see the message: Excel cannot open the file because the file format or file extension is not valid.
This may occur for the following reasons:. If you still get an error message that Excel cannot open the file because the file format or file extension is not valid, there are some great methods to fix it!
In all versions of Excel until , documents were saved in the XLS format. Therefore, all you need is to modify the file format and it will become available. Open Excel and, on the taskbar, select File. Try to restore Excel from the previous version. A list of previous versions will appear; you need to select the option you are interested in and click Restore.
To do this, go to the application and on the Taskbar click on File, then select the Information with the left mouse button.
A list of files that have been automatically saved will appear. If Excel cannot open the file problem is due to file corruption, EaseUS file repair tool can help you fix and recover the Excel file with a few clicks pretty quickly.
It is good at repairing photos, videos, documents, and other files on the hard drive, SD card, memory card, or any other storage medium. No matter whether they are lost or exist on your devices. It's worth a shot.
The following four frequently asked questions are extremely relevant to the "Excel cannot open the file because the file format or file extension is not valid" error. If you also have any of these problems, you can find the methods here. You can try to fix the "Excel cannot open the file because the file format or file extension is not valid" error by changing the file extension:. Open your Excel file.
You can directly change the file extension depending on the version of Excel installed. Click "Save As". Then, check if the error "Excel cannot open the file" is resolved or not. You can re store Excel file format, or the file extension is not valid from previous versions. Select the damaged file. A list of previous versions will appear; you need to select the option you are interested in and click "Restore" to recover. Previous versions come from File History or restore points.
The possible reasons for this issue might be:. When the Excel file is corrupted, not compatible with the Excel version, infected by the virus, or received by email, these are the common causes of the "Excel cannot open the file because the file format or file extension is not valid" problem. If any of these problems appear, you can't open your XLSX file. Daisy is the Senior editor of the writing team for EaseUS.
She has been working in EaseUS for over ten years, starting from a technical writer to a team leader of the content group. As a professional author for over 10 years, she writes a lot to help people overcome their tech troubles. Mahesh is an experienced computer tech writer. He's been writing tech how-to guides for about 8 years now and has covered many topics.
0コメント