View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
54patman 54patman is offline
external usenet poster
 
Posts: 1
Default OWC need help loading and saving with javascript


Hi,

I am trying to view an xls file through IE. I have not been able t
load the file. I have to use Office Web Component (OWC) to get thi
done but I am not sure how. I am able to create the owc and enter dat
but I can not load my file, and eventually I need to save changes.

I have been able to load a HTM version of my file which works but
need to also save the changes but I can not find any documentatio
about how to do this. Also, I need to do this with javascript.

Thanks in advance,

Pat

Here is the code I have so far for my web page:


<HTML<HEAD
<META http-equiv=Content-Type content="text/html
charset=windows-1252"
<META content=FrontPage.Editor.Document name=ProgId
<META content="MSHTML 6.00.2900.2180" name=GENERATOR</HEAD
<BODY
<SCRIPT


function get_a1() {

alert ('the value of cell A1 is: ' + excel.range('a1').value);

return false;

}


function save() {

excel.Workbook.Saved = false;
excel.Workbook.Close;
return false;

}


</SCRIPT

<OBJECT id=excel height=400 width=600
classid=CLSID:0002E551-0000-0000-C000-000000000046
<PARAM NAME="DisplayTitleBar" VALUE="0"
<PARAM NAME="DataType" VALUE="HTMLDATA"
<PARAM NAME="HTMLURL" VALUE="C:\test1.htm"
<PARAM NAME="DisplayWorkbookTabs" VALUE="0"
</OBJECT

<FORM
<INPUT onclick="return get_a1()" type=submit value="Get A1"
<INPUT onclick="return save()" type=submit value=Save

</FORM
</BODY</HTML

--
54patma
-----------------------------------------------------------------------
54patman's Profile: http://www.excelforum.com/member.php...fo&userid=2627
View this thread: http://www.excelforum.com/showthread.php?threadid=39567