Click to See Complete Forum and Search --> : Launch Excel using Perl or Javascript?


lnong
09-09-2003, 01:32 PM
I have a link to an Excel file located on the server. When a client accesses my Perl web application and clicks on this link, the Excel application (on the client machine) should be automatically launched with the file opened, ready for editing.

I was able to achieve this with this Javascript function:


function LaunchExcel(excelFile)
{
var excelApp = new ActiveXObject("Excel.Application");
if (excelApp != null)
{
excelApp.Visible = true;
excelApp.Workbooks.Open("http://localhost/myWebApp/" + excelFile);
}
}


However, I realize that this would only work if the client's IE browser has the "Initialize and script ActiveX controls not marked as safe" option selected. This option is disabled by default.

Is there a way to achieve the same goal using Perl so that I dont have to go to each client the tell them they must change their browser's security settings?