Hello,
I am new to Javascript and need some help in saving a empty Excel spreadsheet to a new file name. The users will make a selection from a list of file names and if they select _default.xls, a blank spreadsheet is displayed on the screen. They then have to key in a description name and a batch number and then click a store button. This should take the _default.xls spreadsheet and save it to a permanent file name. This is where my problems begin. The following is the code I have been using. Can someone please help and direct me in the right direction. Thanks for the help!!
if (filename = defaultxls)
{
mExcel = new ActiveXObject("Excel.Application"
;
mExcel.Visible = false;
mExcel.Workbooks.Open(storefolder + backslash + defaultxls);
mExcel.DisplayAlerts = false;
xlBatchId = Trim(mExcel.ActiveSheet.Cells(5, 1));
mExcel.ActiveWorkbook.SaveAs(storefolder + backslash + jrnlbtch + batchid + hyphen + batchdesc.toLowerCase() + xlsext);
mExcel.ActiveWorkbook.Close();
mExcel.Application.Quit();
mExcel.DisplayAlerts = true;
mExcel = "" }
I am new to Javascript and need some help in saving a empty Excel spreadsheet to a new file name. The users will make a selection from a list of file names and if they select _default.xls, a blank spreadsheet is displayed on the screen. They then have to key in a description name and a batch number and then click a store button. This should take the _default.xls spreadsheet and save it to a permanent file name. This is where my problems begin. The following is the code I have been using. Can someone please help and direct me in the right direction. Thanks for the help!!
if (filename = defaultxls)
{
mExcel = new ActiveXObject("Excel.Application"
mExcel.Visible = false;
mExcel.Workbooks.Open(storefolder + backslash + defaultxls);
mExcel.DisplayAlerts = false;
xlBatchId = Trim(mExcel.ActiveSheet.Cells(5, 1));
mExcel.ActiveWorkbook.SaveAs(storefolder + backslash + jrnlbtch + batchid + hyphen + batchdesc.toLowerCase() + xlsext);
mExcel.ActiveWorkbook.Close();
mExcel.Application.Quit();
mExcel.DisplayAlerts = true;
mExcel = "" }