Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh excel data on load

Status
Not open for further replies.

peterswan

Programmer
Joined
Sep 25, 2002
Messages
263
Location
US
Hello,

I'm using some ColdFusion code to load data from a query into an Excel Spreadsheet. Here's the code:

<CFHEADER NAME=&quot;Content-Disposition&quot; VALUE=&quot;inline; filename=temp.xls&quot;><CFCONTENT TYPE=&quot;application/msexcel&quot; reset>

Everything runs fine unless the user chooses some more parameters and tries to reload the page, at which point the new page never loads, and excel displays the same old page. The user has to close the old page in order to see the new data. As most users are not aware that they need to actually close the old page in order to see a new one, I'd like to know if anyone can help me automatically close the old page before the new one loads, or somehow tell Excel to load the same page with fresh data.

Any ideas? [smile]

Thanks for any help,

Peter Swanson
 
I think I had that problem before...
Now, I solved by everytime I created an excel file I used a different name. That is, I created a random name. Hope this will help.

Dr. Stern
 
Hi DrStern,

Thanks for your reply. Randomizing the filename in the CFHeader tag didn't help, since the excel file doesn't get named &quot;temp.xls&quot;. It gets named what the action page is named in my form tag of the previous page. So I loaded an excel page with one action page and it loaded fine. Then I tried using a different action page, and the new page loaded into excel fine, even though I never closed out the original file.

The only problem is I can't randomize the name of my action page because the page won't exist when the form submits.

Any ideas?

[smile]

Peter Swanson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top