Good call on that. window.location.href returns the full path of the currently running page.
Based on that I came up with this code.
Unfortunately it is not as easy as just grabbing the path.
Since it will be running locally it will append file:/// to the beginning of the path. So in this script I grab the path, convert all the forward slashes to backslashes (adding extras as escape characters so javascript will not eat them), remove the file:///, then remove the name of the currently executing file.
All you have to do then is provide the name of the file.
If the file is in a sub folder then you have to put the foldername, use two backslashes (one is an escape character) and then the filename.
There may be a more elegant way to do this but this is the best I could do. These regular expressions are a PITA.

BTW, since you know where the file will be I removed passing the filename into the function. If you are going to add more than one file to be opened you could always put it back in and append it to the myfile variable.
<script language="JavaScript">
function startExcel()
{
//Grab path of current executing file.
var fullpath = new String(parent.location);
//Replace all forward slashes with back slashes.
var replacetext = /\//g
fullpath = fullpath.replace(replacetext,"\\");
//Replace %20 with spaces.
fullpath = fullpath.replace(/%20/g," ");
//Remove the name of the currently executing file from the path.
var curfile = fullpath.substr(fullpath.lastIndexOf('\\')+1);
var programpath = fullpath.substring(8,fullpath.length-curfile.length);
//Set name of file to open (ie. myfile.xls or subfolder\\myfile.xls
//Make sure to use two backslashes between folder and filename.
var myfile = "mytest.xls";
var strFile = programpath + myfile;
var myApp = new ActiveXObject("Excel.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Workbooks.Open(strFile);
myApp = nothing;
}
else
{
alert("Failed to open object");
}
}
startExcel();
</SCRIPT>
Paranoid? ME?? WHO WANTS TO KNOW????