I have a web report which is done using JSP & HTML
Created May 7, 2012
Sujatha Gopal
(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
<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