Free Support Forum -

Infrequently and randomly- file created is not valid format

This has happened twice in our production system where the file created by our internal web serivce that wraps the Aspose functionality is returning an invalid document. These invalid documents cannot be opened in Excel and return the error "file.xls: file format is not valid.".

We are using Aspose.Cells version

This morning after it created an invalid document, a few minutes later the same code was re-run and it created the valid document. So far it has only created invalid documents twice to our knowledge. If you still want to see the invalid document vs. the good document I can email them (attachment removed)

I did notice that if we try to open the file using the Aspose library that created it, it gives the following slightly more detailed error of:

Index and count must refer to a location within the buffer.
Parameter name: bytes



Is it possible that the invalid document is caused by unstable network. Is it possible sometimes that the bad network caused this problem?

I thought about that, but the strange part was that the bad document was longer than the good document by 2kb. My thinking was that a poor transmission would, if anything, cause it to be truncated.

Thanks for looking at this. Perhaps we need to put verification code (re-load doc via Aspose library) around any document our web service returns for the interim....

It appears that MS Outlook opens and modifies files that are Office documents. We cannot find a reason for MS Outlook to do that, especially when no junk mail or virus filters are installed or enabled. This experiment is easy to do, just email any Office document from Outlook and you will see its byte size has changed on the receiving end. Apparently, in some cases, it modifies documents made by Aspose in a way that corrupts them. The corruption does not happen often, but we’ve seen it a few times.

Thank you, Roman. We will check this Outlook issue.