in reply to Refresh page then download from a cgi program
The URL of the file to be downloaded can be a script. So the first form could submit to script1, which would print the desired information then redirect to script 2, which would produce the Excel document.