View XLSX file from ASP.NET - 09-21-2009 , 10:53 AM
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
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
If dr.Read Then
Any advise please. Thanks.
|Thread Tools||Search this Thread|