I have a web report which is done using JSP & HTML

Sujatha Gopal

<SCRIPT LANGUAGE="JAVASCRIPT">
var wind="";
function OpenExcel()
{
    wind=window.open("c:exceldata.xls","Report","toolbar=yes,scrollbars=yes,resizable=yes,top=0,left=0,menuBar=yes");
    wind.window.focus();
}

function closeWin() 
{
  if (wind && wind.open && !wind.closed) wind.close();
}
</SCRIPT>
Call the OpenExcel function on OnClick of the anchor tag
(a href="javascript:void()" onclick="return OpenExcel()")OPen Excel(/a)

Invoke the closeWin function on Unload Event of the Body Tag.
The excel sheet gets closed automatically on navigating to other pages.

Hope this will help to close the excel sheet

Have to use methods of java.io to find file already exists and to delete the file
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact