Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Opening XLS using Java script


Message #1 by "Deepa" <itsdeepa@h...> on Fri, 21 Feb 2003 15:00:29
Hi, 
My machine has Office XP installed. 
The following Javascript gives an error on my machine. 
"Unable to get the Open property of the Workbooks class"

function fnSubmit()
{
	var theForm;
	theForm = document.submitform;

	//alert ( theForm.hidFileName.value);
	var oExcelInstance = new ActiveXObject("Excel.Application");
	var oDoc = oExcelInstance.Workbooks.Open("C:/To Do.xls")
	oExcelInstance.visible = true;
}

At the same time, this code works fine on a machine with office 2000 on 
it. 

Any pointers? 
Thanks.
Deepa

  Return to Index