<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=291163909-11112006><FONT face="Comic Sans MS" color=#000080 
size=2>Consider upgrading to Visual Studio 2.0&nbsp; Dotnet is the upgrade path 
from classic ASP.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV align=left><FONT color=#000080 size=2>John Warner</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  javascript-bounces@LaTech.edu [mailto:javascript-bounces@LaTech.edu] <B>On 
  Behalf Of </B>vijaykumar bavareddy<BR><B>Sent:</B> Saturday, November 11, 2006 
  2:23 AM<BR><B>To:</B> javascript@latech.edu<BR><B>Subject:</B> [Javascript] 
  Excel API<BR><BR></FONT></DIV>function ToExcel()<BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if 
  (window.ActiveXObject)<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;{<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp; 
  xlApp = new ActiveXObject("Excel.Application"); <BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var xlBook = 
  xlApp.Workbooks.Add(); <BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;xlBook.worksheets("Sheet1").activate;<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;var XlSheet = xlBook.activeSheet;<BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;xlApp.visible = true; 
  <BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var 
  hdrcol=document.getElementsByName("hdrcol"); <BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var 
  nRowsCount=pshipGrid.getRowsNum();<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;var 
  nColCount=pshipGrid.getColumnCount();<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;for(var P = 1; P&lt;=nRowsCount ; 
  P++)<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;{<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(var Q 
  = 1; Q &lt; nColCount; Q++) <BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;{<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;if (P==1)<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;{<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;XlSheet.cells(P ,Q).value =&nbsp; 
  hdrcol.item(Q).innerHTML;<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp; var cell=pshipGrid.cells(P,Q);<BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; XlSheet.cells (P +1,Q).value = 
  cell.getValue(); <BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;}<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;}<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;XlSheet.columns.autofit; <BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;}<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; &nbsp;}//end function <BR><BR>Hi above code am using to 
  create Excel document for grid data using javascript and Activex object.. but 
  problem is i just want do this without using Activex object( 
  Excel.Application).. and it should work in both IE and FF in Windows 
OS..<BR></BLOCKQUOTE></BODY></HTML>