HttpZip and Aspose.Excel


#1

Our web host installed HttpZip software on our site which caused a problem with our Excel downloads. I was unable to open any downloaded Excel files from my local drive. The error message is:

Microsoft Excel error “XXXXX.xls cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding”.

Disabling the HttpZip from the site resolved the problem. Is Aspose.Excel incompatible with HttpZip software?

Thanks,
Al


#2

Hi Al,

I think it’s the limitation of HttpZip software. Aspose.Excel use HttpResponse to directly send result data to client. It’s a standard and dynamic way. I don’t know much about HttpZip software. Could it zip the dynamic contents of an aspx page?


#3

Hi Laurence,

Their website explains what it does:
http://www.port80software.com/products/httpzip/?vid=832257

Thanks,
Al


#4

Hi Laurence,

Any ideas yet on what causes the incompatibility with HttpZip?


#5

Hi Laurence,

Any ideas yet on what causes the incompatibility ?


#6

Hi Al,

I still have no ideas about this issue. But you can download the latest hotfix and have a try.

If it still is incompatible with HttpZip, you can try use Excel.Save(string,FileFormatType,out MemoryStream) method or Excel.Save(string,FileFormatType) to save result file to memory or disk. Then you can use your own code to send it to client.


#7

Hi

Maybe I can help

Try to use the following code before streaming of Excel file.


With Response
.Clear
.ClearHeaders
.ClearContent
.Cache.SetExpires(Now.AddDays(-1))
.AddHeader(“pragma”,“no-cache” )
.ContentType = “application/vnd.ms-excel”
.AddHeader(“Content-disposition”, “inline; filename=test.xls”)
End With
’— Here insert Aspose Code for streaming Excel File

’—
Response.Flush