JavaScript Excel, XML

L

LukeK1980

I have a script running to save an Excel workbook as an XML file, that
works fine. Now I want to load the new XML file to the page but the
file does not load. I check the ready state it equals 4, I check if
the file exists and I get true, but when I try to read it I get that
the file is not there. If I add an alert() before the xml load it
works fine, I can read the file.

NONE working
var Excel, Book, Fin; // Declare the variables
// Create the Excel application object.
Excel = new ActiveXObject("Excel.Application");
Excel.Workbooks.Open(tis);
Excel.DisplayAlerts="False";
Excel.ActiveWorkbook.SaveAs(jobLoc + accId + "preCIAL.xml", 46);
Excel.DisplayAlerts="True";
Excel.Quit();
xml=loadXMLDoc(jobLoc + accId + "preCIAL.xml");
// works if this alert is active **alert(anything goes here)
newDoc=xml.documentElement;
alert(newDoc.xml);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top