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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cold Fusion and Excel

Status
Not open for further replies.

pixiesfb

Programmer
Apr 27, 2001
62
US
I am successfully populating an Excel sheet in a browser.
If I change my data, I expect these changes to show when I refresh my browser. My problem is that I cannot get the data to refresh at all. I am using the DROP SQL command, which (supposedly) deletes the current info in the Excel sheet before repopulating with fresh data. ??It appears that the Excel sheet is cached??

It is impossible to use UPDATE SQL or DELETE SQL with ODBC, only INSERT.

(Also, I've tried using cffile=copy to create a blank Excel file every time and then populate it. This works one time, then I cannot delete it to create another one, ODBC don't like it!)

Help!
 
You are correct, the problem is caching.

An XCEL spreadsheet opened through Active X controls in your browser is a temp file on your local machine. Any "refreshing" will just pull the temp file again. The idea is that the user will be looking at this sheet in a browser, and that they might want to make changes to it and save it locally.

If you want them to pull the most recent version, you're gonna have to send them BACK, and then have them click the link again to download the file.

Question: if you're using XCEL as your database.. why not use CF to query and output the result set in HTML? Refreshing would then actually hit the server for the most recent data, as opposed to hitting the client's file again and again.
 
Even if I go back to the link and try to download again, it doesn't work. Same old data appears. Here's a strange occurance: The Xcel sheet will always be populated until someone clicks the link to load it, which does the drop and then the insert (in theory, arggghhh!!!). A co-worker who had previously never opened it on their machine opens it and gets the same old data, as if it were cached on thier machine, but that's impossible since they had never opened it.

Wha???
 
Hey man I dont know, either share an XCEL file across the network or use a real database and query system.
 
I've abandoned the current method and am using a custom tag to create an excel sheet using COM objects. Working much better but also presents some new probs. (On to another forum...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top