Excel found unreadable content in 'file.xlsx'

I am getting this error whenever I attempt to do anything with a file. I have simplified my code to the point where all it does is open the file, then save it (no operations in between), and I always get this error. I’m using version 5.1.2.


Attached are the following files:

error.jpg - screenshot of the message excel throws
primary.xlsx - the file that I’m opening
primary_output.xlsx - the file after I open it and save it using ASPOSE.Net

Here is the code that produces the error

Dim lo As New LoadOptions(LoadFormat.Auto)
Dim wb As New Workbook(“d:\code\NationalParks\Output\1\Primary.xlsx”, lo)
Response.Clear()
Response.AddHeader(“Content-Type”, “application/vnd.ms-excel; charset=windows-1251”)
Response.AddHeader(“content-disposition”, “attachment; filename=”“” & “test.xlsx” & “”“”)
Dim ms As New IO.MemoryStream
wb.Save(ms, SaveFormat.Xlsx)

Response.BinaryWrite(ms.ToArray())
Response.End()

Hi,

Thanks for the template files.

I have found the issue after an initial test, we will figure it out soon.

I have logged your issue into our issue tracking system with an id: CELLSNET-19585.

Thank you.

Any progress on this?

Can you also look into the following issue with the same file:

I cannot set any formulae in the worksheets.

If I add the following line of code

wb.worksheets(5).cells("B4").formula="=9+1"

No formula is set (and it makes no difference what the formula is.

Thank you - I'm about to put in a PR for ASP.net total, but can't very well do it if it doesn't work.

Hi Christopher,

We are in process of fixing the issue. We will update you as soon as it is fixed.

Set formula is working fine. Please find the attached screen shot. We have used the template file which you had provided.

wb.worksheets(5).cells("B4").formula="=9+1"
The code line above produce the required results which can be seen in the attached screen shot.

Thanks,

Sorry - I forgot which template you had…try doing set formula on column C rather than B.

Hi,

We have checked thoroughly your sample file, if you could open your template file “Primary.xlsx” into MS Excel 2007 file, it also produces the same error “Excel found unreadable content…”. So, it is not an issue of Aspose.Cells. To confirm it, you may open your sample file into MS Excel and then re-save the file. Now use Aspose.Cells to open, set formulas etc. and save the file. If you open the generated file into MS Excel 2007, it won’t give you any error.

I am using the following sample code with the attached version/fix (latest):
LoadOptions lo = new LoadOptions(LoadFormat.Auto);
Workbook wb = new Workbook(“e:\test\Resaved_Primary.xlsx”, lo);
wb.Worksheets[5].Cells[“C4”].Formula = “=9+1”;
wb.Save(“e:\test\outPrimary.xlsx”);


If you still find any issue, kindly post your correct file here, we will check it soon.

Thank you.

OK - I have a new final template file, and I'm getting the unreadable content error. Also, I went back and opened the template you said generated the error in Excel 2007 in Excel 2007 and I did NOT get the error.

In any case - this is the final template, and I am getting the error - unreadable content. Please advise.

Hi,

I open your attached template file in MS Excel 2007 and I can get the same error, see the attached screen shot.

I don't get that...at all. I only get it after generating the file with aspose. Also - if I open it and save it (as you suggested in the past), I continue to get the error.

Hi,

Kindly give us details which MS Excel version you are using?

Thank you.

Microsoft Office Excel 2007 (12.0.6535.5002) SP2 MSO (12.0.6535.5002)

Hi,

Thanks for giving info about your MS Excel version. We will further look into your issue soon.

Thank you.

Hi Christopher,

Please use the updated version of Aspose.Cells.dll v5.1.2.5 attached. The issue has been resolved.

Thanks,

This portion is working now. I'm having an issue with borders, but I'll start another topic for that one.

The issues you have found earlier (filed as 19585) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.