We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Xlsx file opening warning with Excel 2007

Hi I’m using aspose-cells-7.0.2-java, and I have trouble opening a xlsx
fomatted file using Excel 2007. The Error goes as-“Excel found
unreadable content in report.xlsx .Do you want to recover the contents
in this workbook…”.

I’m saving the file as follows:
wb.save(template_file_path + “.xlsx”, FileFormatType.XLSX);
Opening this saved file directly has no Issues.

But I need to open it via php, with set content type as below, and the error occurs at that point:

header(“Content-type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”);
header(“Content-Disposition:attachment;filename=report.xlsx”);
readfile(“C:\wamp\www\homecontents\includes\aspose-cells-7.0.2-java\JDK 1.6\out\fileone.xlsx”);

Do I have a wrong Content type?or what could be the issue?
Your help is very much appreciated and thanks in advance for your help.

Hi,


I am not sure about your issue. Do you get the error: "Excel found unreadable content in " while opening the template file into MS Excel 2007 and there is no issue at all for Aspose.Cells for Java as you said:
"I’m saving the file as follows:
wb.save(template_file_path + “.xlsx”, FileFormatType.XLSX);
Opening this saved file directly has no Issues."
So, if this is the case, I am afraid, your issue is not related to Aspose.Cells for Java by any means. Also, I am not an expert of php, so I cannot help much if you got the issue regarding your php lines of code. I think you should try to google or get online help on internet resources if you could get some help.

We are responsible to fix issues if you generated a file by Aspose.Cells for Java, and the generated file prompts MS Excel to show the warning or error message.

Thank you.

Hi Amjad,

Thanks for the response. I believe what you are saying is correct.
I’ll try to find if there’s anything wrong with the mime type etc.

Thanks for your time.
Nish