Page 1 of 1

Page refresh after Excel download quirk

Posted: Thu Jan 20, 2011 10:40 am
by brothaofdes
I have a small program designed to export table data into Excel that has a strange issue.
Initially, the page will load with options to select a table view to export. When the user selects the option, the table data is extracted into an Excel file. On the first pass, this runs fine. BUT… when the user selects another option from the page, the browser will display a partial view of the plain html text.
What I think is happening is that after the Excel file is output, that the initial selection page is not being re-rendered and that there is a conflict between the Download header and the selection page.
I did a test on the page by setting an element to be visible on the user selection page by using a control variable. When the page initially loads, the variable is set to ‘ON’ and I reset this variable after the Excel is downloaded to ‘OFF’ (1 and 0). But, the element never clears after the Excel file is processed.
Has anyone ever seen this before? If so, what technique do you use to resolve this issue?

Re: Page refresh after Excel download quirk

Posted: Fri Jan 21, 2011 1:31 pm
by Jade
Are you setting the proper header each time you're triggering the excel export?

Re: Page refresh after Excel download quirk

Posted: Fri Jan 21, 2011 2:18 pm
by John Cartwright
Jade wrote:Are you setting the proper header each time you're triggering the excel export?
Post your download script. I would agree with Jade it sounds like your doing something funky with the headers.