Hi All,
I have written Browser Script in a BS to use excel application. I have written below escript. It prompts me for the path of the excel. After providing the exact path and name of the excel, I click on the OK button. It seems the rest of the code is not working as I do not see any alert after that. I need your help please.
function ActivateWFBulk()
{
try
{
//theApplication().SWEAlert("BS Browser Script Method ActivateWFBulk");
var Filename;
var excelApp;
var RowNo = 1.0;
var Name;
Filename = prompt("please enter the filename with complete path","D:\\Workflow.xls");
excelApp = new ActiveXObject("Excel.Application");
if (excelApp != '')
{
alert("ActiveXObject");
excelApp.Workbooks.Open(FileName);
RowNo = parseInt (RowNo);
Name = excelApp.Sheets(Workflow).Cells(RowNo, 0).Value;
while (Name != 'undefined')
{
alert (Name);
RowNo = RowNo + 1.0;
RowNo = parseInt (RowNo);
Name = excelApp.Sheets(Workflow).Cells(RowNo, 0).Value;
}// while (Name != 'undefined')
excelApp.Workbooks.Close ();
} // if (excelApp != "")
else
alert ("Invalid excel");
alert ("Total now of workflows" + (RowNo - 1));
}// try
catch(e)
{
theApplication().RaiseErrorText(e.message);
}
}