Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

IE Export to Excel option not working with POSTed data

Posted on 2012-04-11
1
Medium Priority
?
408 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
[X]
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
1 Comment
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

636 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