I know this types of question doesn't belong to here but this is my last hope to get answer and solution for this. I had made a html and javascript program to read excel file through Active X, but problem is that whenever I run that page the it runs fine but when i closed it the excel file remain open and if I run this page 100 times and then close it then there will be 100 unclosed excel file which leads to slowdown my PC. And second problem is that when I try to open that excel file which is being used by that application(the application is not currently running when i tried to open excel file) it does not open without giving an error,an window of excel file open and closed with in a small part of second..I don't know what to do to resolve this. If there is any problem in my code then here it is
var xVal = 1;
var yVal = 2
function readdata(x,y) {
x = xVal;
y = yVal;
try {
var excel = new ActiveXObject("Excel.Application");
excel.Visible = false;
var excel_file = excel.Workbooks.Open("D:\\Test1.xls");// alert(excel_file.worksheets.count);
var excel_sheet = excel_file.Worksheets("Sheet1");
var data = excel_sheet.Cells(x, y).Value;
//alert(data);
drawWithexcelValue(data);
xVal = xVal + 1;
}
catch (ex) {
alert(ex);
}
}
this is the code through which I am reading the excel file.
excel.Quit()at the end.}of thereaddatafunction.