I had wanted to put a solution onto a thumb drive or dvd to be distributed as needed. I have a couple html pages with javascript to display photos and some other info. I also have an excel spreadsheet (2003) that I wanted to link to the htm开发者_如何学Cl page. However when I try to use a querystring I get a warning from excel stating that it "cannot open the specified file."
edit: I use javascript to parse the querystring and load a specific photo and some info.
This does not work:
=HYPERLINK("site_photos.htm?p=1", "photo 1")
This works:
=HYPERLINK("site_photos.htm", "photo 1")
Any help here would be greatly appreciated.
edit:
Okay, I've tried using ThisWorkbook.FollowHyperlink procedure using the extrainfo and not using the extrainfo parameter. This did not work. I also tried using a shell command. This also did not pass the querystring either. It looks like I will need another solution.
edit:
Here's the javascript function used to retrieve the querystring. The querystring is not in the window.location.href so this will not work when called.
function parseUrl(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexStr = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexStr );
var results = regex.exec(window.location.href);
if( results == null )
return "";
else
return results[1];
}
Whether it is possible to perform the original task or not, I have opted for a different solution. I will use image controls to view the photos and other controls for navigation.
精彩评论