Hello, I’m fairly new to javascript. I’m making a website for my personal use that will read from Excel and display some data on an HTML page and I’ve been learning javascript as I go.
A problem I have is when I leave the website running overnight (it refreshes itself every minute), an error eventually pops up that says
“Not enough memory to run Microsoft Office Excel. Please close other applications and try again.”
Internet Explorer also gives the error “Automation Server can’t create object” on the line
[CODE]var excel = new ActiveXObject(“Excel.Application”);
so anyways heres my code for opening excel
[CODE]var excel = new ActiveXObject(“Excel.Application”);
excel.visible=false;
var excelfile = excel.Workbooks.Open(“displayinfo.xls”);
var excelsheet = excel.Worksheets(“Sheet1”);
I use actually vbscript to go through task manager and kill the “EXCEL.EXE” process, but that didnt help get excel out of memory and I tried this code to no avail-
[CODE]excelfile.Close(false);
excel.Quit();
excel = null;
setTimeout(“CollectGarbage()”,1);
I’ve been searching the internet for a solution for days now, and I’ve tried my best to solve this on my own. Any help on how to correctly release excel from memory would be greatly appreciated.