View Full Version : Pass referring link
2011-08-15, 11:24 PM
Anyone know of a way to capture the link a sheet comes from? Ie click a link to open an excel file and the sheet knows the url of the page that called the file? I'm building a template for projects, the task list publishes RSS so rather than save a file with all the details if I can capture the url that the sheet was linked from I can populate the sheet dynamically.
2011-08-17, 11:32 PM
Interesting question... can't say that I do. I'd be surprised if Excel captured that information though as the process of opening Excel was shelled out to the OS to do, right?
2011-08-19, 03:22 AM
Exactly. I could code the website to make a cookie but then I'd have to instance the default browser, could be tricky.
2011-08-19, 06:00 AM
Right, and even with that, if they happen to not be working in their default browser then it may not be exact.
Do they always come from the same domain? Would it be possible to check all active browser windows and parse the addresses to see which match your top level domain? I guess that would only work if the user wasn't running multiple tabs though...
2011-08-19, 12:57 PM
very interesting problem, making me curious; I have some additional questions...
Is it always the same Excel file which is being downloaded?
Can you run PHP scripts on your server or scripts in another language?
Is it possible, for example, to rename the workbook similar to the URL or putting an ID in its name for matching the ID later with a list of URL's?
2011-08-19, 11:56 PM
Ken, they always come from the same domain, it would be an internal site so I have pretty free access to do whatever I wish. I suppose what I could do would be set a variable server side when you click and then have the excel file pull and clear the flag.
Maninweb, I want to use one file that generates when you open it. I can run PHP or just about anything really. I don't want to change the filename, I want it to stay static.
2011-08-22, 05:03 PM
I suppose what I could do would be set a variable server side when you click and then have the excel file pull and clear the flag.
Sounds like that might be the easiest solution to go with to me. :)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.