Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

IE Export to Excel option not working with POSTed data

Posted on 2012-04-11
1
376 Views
Last Modified: 2013-11-19
I have a dynamic html page (created by a cgi script) that I'd like users to be able to right click and use IE's built-in "Export to Microsoft Excel" option.  This works on a static page, but not when any form variables are passed to the script.

The following is a simple example where the username and password are set as hidden variables.  This is not actually what I'm trying to accomplish, but illustrates the problem.

http://www.surveystar.com/test/test_counts.htm

If, instead, the variables are passed in the URL, it works fine (like this link):
http://www.surveystar.com/cgi-local/basicdemo_counts.cgi?username=datastar&password=datastar

It seems the problem is that IE re-loads the page before it exports, dropping any POSTed form variables.  Is there any way around this (other than a custom routine that exports to Excel) -- I'm really looking to allow users to use the built-in function.

Thanks in advance!
0
Comment
Question by:datastarstar
1 Comment
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 37836799
When I have done this sort of thing, I have written out a CSV file on the server and given the client a clickable link.  The CSV file extension is almost universally associated with Excel.  When they click the link, a spreadsheet opens.  This seems to work correctly on all modern versions of Windows and is browser independent.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question