![]() |
|
|
|
#1 |
|
Hi there,
I have web application for viewing document saved in SQL Server 2005 database. I can retrieve any file type (PDF, XLS, HTML,...) but not XLSX file. When I try to open the xlsx file, I got the popup window say "Do you want to open or save this file?" I picked open then popup window with message say Execl found unreadable content in 'viewdocument.aspx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes. I did click Yes then the other window popup say "Excel cannot open the file 'viewdocument.aspx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file", now only OK button. I click Ok then nothing happen. We recently installed update for Office. It only happened to excel 2007 (xlsx), I still open excel with ext xls. Below are my coding for xlsx file Response.ClearContent() Response.ClearHeaders() Response.Clear() If dr.Read Then Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" Response.AddHeader("Content-Disposition", "no-cache") Response.BinaryWrite(dr("doc_image")) End If Response.Flush() Response.End() Any advise please. Thanks. Madison |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| viewstate MAC failed in asp.net 2.0 while postback the page | azraffarveen | Software | 0 | 05-12-2009 03:24 PM |
| .NET 2.0 Web Apps / .NET 3.5 ASP.NET Apps - Differences/Similariti | london1919 | MCTS | 1 | 12-08-2008 03:16 PM |
| ASP.NET: Asign Users in Roles(Array.IndexOf(Of String) method) | msandlana | Software | 0 | 04-25-2008 06:37 AM |
| ASP.NET deadlock | viktoria | Software | 0 | 07-05-2007 02:53 AM |
| ASP.NET 2.0 application does not run in WIN2k3 | johnfraj | Software | 0 | 04-19-2007 08:27 AM |