Results 1 to 7 of 7

Thread: Pass referring link

  1. #1

    Pass referring link



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.

    Jesse

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    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?
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    Exactly. I could code the website to make a cookie but then I'd have to instance the default browser, could be tricky.

  4. #4
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    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...
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  5. #5
    Hi...

    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?

    Regards :-)

  6. #6
    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.

    Jesse

  7. #7
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    Quote Originally Posted by Jesse View Post
    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.
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •