Link to home
Start Free TrialLog in
Avatar of C_J_L
C_J_L

asked on

Export to Excel From Browser Error

When exporting to Excel from browser, I get the following error in Excel: Unable to open http://.... The internet site reports that a connection was established but the data is not available.

Are there certain restrictions regarding types of tables or formatting of tables that Excel ignores?

This probably isn't a difficult question, I just need to know quickly.
Avatar of aimfan
aimfan

Are those info show correctly before export?
I use following code and it works:
' Tells the browser to use Excel to open the file
Response.Clear()
Response.AddHeader "Content-Disposition", "attachment; filename=ACRpt.xls;"
Response.ContentType = "application/vnd.ms-excel"

Avatar of C_J_L

ASKER

All I am doing is right clicking in IE on Export to Excel. It works on other web pages (not our app) but not on our table. Why is it saying data is not available? Is it because it can't see it?
Avatar of Serena Hsi
What permissions have been set for that file and/or its data range?
Avatar of C_J_L

ASKER

IE opens Excel and places the data into a new worksheet with no access restrictions.
Avatar of C_J_L

ASKER

I found the reason why it was giving me that error.

I used the button on the TOOLBAR to select Edit with Microsoft Office Excel which did work. This button will open Excel and present a web query window which allows you to choose which of the tables on the web page you want to import. But in this case, in the web query window we are asked to login again (secure site), and choose all of the selection criteria again as if I just starting fresh. Then when you have tables available in the window, you select the arrow icon by the table you want to import and click import. This imports it into the spreadsheet.

Doing the right click on the web page, and choosing export to Microsoft Excel will not work because it skips the web query window and tries to automatically export ALL tables on the web page. And in this case, there are no tables populated because Excel could not login and make selections to populate the tables so it gives the error of no data is available in the tables.

So this question is closed.

ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial