Hi guys! I cant figure out how to prevent the output of table 'listTable2' from displaying in the browser. Hidden field is not working. Maybe you can help 
<html>
<head>
<title>Printing With Excel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="javascript">
function rewrite2(value)
{
document.all.needed.innerHTML=value
}
function rewrite3(value)
{
document.all.needed2.innerHTML=value
}
</script>
<body bgcolor="#FFFFFF">
<form name="a">
<table name="listTable" id="listTable" width="98%" border="0">
<tr>
<td colspan="3">
<div align="center"><b>MAINTAIN CLIENT</b></div>
</td>
</tr>
<tr>
<td width="14%"></td>
<td width="62%"></td>
<td width="24%"></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td width="14%"><b>Client No.</b></td>
<td width="62%"><b>
<input type="text" name="text1" size="15" onchange="rewrite2(this.value)">
</b></td>
<td width="24%"><b> </b></td>
</tr>
<tr>
<td width="14%"><b>Client Name</b></td>
<td width="62%"><b>
<input type="text" name="text2" size="40" onchange="rewrite3(this.value)">
</b></td>
</tr>
</table>
<table name="listTable2" id="listTable2" width="98%" border="0">
<tr>
<td colspan="3">
<!div align="center"><!b><!/b><!/div>
</td>
</tr>
<tr>
<td width="14%"></td>
<td width="62%"></td>
<td width="24%"></td>
</tr>
<tr>
<td width="14%"><b></b></td>
<td width="62%"><!b>
<span id="needed"><input type="hidden" name="hidden1" value=document.a.listTable.text1.value></span>
<!font color="#FFFFFF"><!span id="needed"><!document.a.listTable.text1.value></span></font>
</b></td>
<td width="24%"><b></b></td>
</tr>
<tr>
<td width="14%"><b></b></td>
<td width="62%"><!b>
<span id="needed2"><input type="hidden" name="hidden2" value=document.a.listTable.text2.value></span>
<!font color="#FFFFFF"><!span id="needed2"><!document.a.listTable.text2.value></span></font>
</b></td>
</tr>
</table>
<input type=button value=Print onClick="rewrite(this.form)">
</form>
<script language="javascript">
function rewrite(a){
//win=window.open('','win','width=5,height=5,statusbar=0,menubar=0,title=0,status=0');
//this.window.document.writeln('<html><head><title></title></head>')
//this.window.document.writeln('<body bgcolor=white>')
//win.document.writeln('<font color=red></font>')
//win.document.writeln('<form name="f">')
//win.document.writeln('<table name="listTable2" id="listTable2" width="98%" border="0">')
//win.document.writeln('<tr>')
//win.document.writeln('<td colspan="3">')
//win.document.writeln('<div align="center"><b>MAINTAIN CLIENT</b></div>')
//win.document.writeln('</td>')
//win.document.writeln('</tr>')
//win.document.writeln('<tr>')
//win.document.writeln('<td width="25%"><b>Client No.:</b></td>')
//win.document.writeln('<td width="70%"><b>')
//win.document.writeln(a.text1.value)
//win.document.writeln('</b></td>')
//win.document.writeln('<td width="24%"><b> </b></td>')
//win.document.writeln('</tr>')
//win.document.writeln('<tr>')
//win.document.writeln('<td width="25%"><b>Client Name:</b></td>')
//win.document.writeln('<td width="70%"><b>')
//win.document.writeln(a.text2.value)
//win.document.writeln('</b></td>')
//win.document.writeln('</tr>')
//win.document.writeln('</table>')
//win.document.writeln('</form>')
//this.window.document.writeln('<font color="BLACK"><span id="needed"><document.a.listTable.text1.value></span></font>')
//this.window.document.writeln('<font color="BLACK"><span id="needed2">document.a.listTable.text1.value</span></font>')
//this.window.document.writeln('</body></html>')
textRange = document.body.createTextRange();
textRange.moveToElementText(listTable2);
textRange.execCommand("Copy"
;
window.open('outputExcel.xls','printing');
}
</script>
</body>
</html>
<html>
<head>
<title>Printing With Excel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="javascript">
function rewrite2(value)
{
document.all.needed.innerHTML=value
}
function rewrite3(value)
{
document.all.needed2.innerHTML=value
}
</script>
<body bgcolor="#FFFFFF">
<form name="a">
<table name="listTable" id="listTable" width="98%" border="0">
<tr>
<td colspan="3">
<div align="center"><b>MAINTAIN CLIENT</b></div>
</td>
</tr>
<tr>
<td width="14%"></td>
<td width="62%"></td>
<td width="24%"></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td width="14%"><b>Client No.</b></td>
<td width="62%"><b>
<input type="text" name="text1" size="15" onchange="rewrite2(this.value)">
</b></td>
<td width="24%"><b> </b></td>
</tr>
<tr>
<td width="14%"><b>Client Name</b></td>
<td width="62%"><b>
<input type="text" name="text2" size="40" onchange="rewrite3(this.value)">
</b></td>
</tr>
</table>
<table name="listTable2" id="listTable2" width="98%" border="0">
<tr>
<td colspan="3">
<!div align="center"><!b><!/b><!/div>
</td>
</tr>
<tr>
<td width="14%"></td>
<td width="62%"></td>
<td width="24%"></td>
</tr>
<tr>
<td width="14%"><b></b></td>
<td width="62%"><!b>
<span id="needed"><input type="hidden" name="hidden1" value=document.a.listTable.text1.value></span>
<!font color="#FFFFFF"><!span id="needed"><!document.a.listTable.text1.value></span></font>
</b></td>
<td width="24%"><b></b></td>
</tr>
<tr>
<td width="14%"><b></b></td>
<td width="62%"><!b>
<span id="needed2"><input type="hidden" name="hidden2" value=document.a.listTable.text2.value></span>
<!font color="#FFFFFF"><!span id="needed2"><!document.a.listTable.text2.value></span></font>
</b></td>
</tr>
</table>
<input type=button value=Print onClick="rewrite(this.form)">
</form>
<script language="javascript">
function rewrite(a){
//win=window.open('','win','width=5,height=5,statusbar=0,menubar=0,title=0,status=0');
//this.window.document.writeln('<html><head><title></title></head>')
//this.window.document.writeln('<body bgcolor=white>')
//win.document.writeln('<font color=red></font>')
//win.document.writeln('<form name="f">')
//win.document.writeln('<table name="listTable2" id="listTable2" width="98%" border="0">')
//win.document.writeln('<tr>')
//win.document.writeln('<td colspan="3">')
//win.document.writeln('<div align="center"><b>MAINTAIN CLIENT</b></div>')
//win.document.writeln('</td>')
//win.document.writeln('</tr>')
//win.document.writeln('<tr>')
//win.document.writeln('<td width="25%"><b>Client No.:</b></td>')
//win.document.writeln('<td width="70%"><b>')
//win.document.writeln(a.text1.value)
//win.document.writeln('</b></td>')
//win.document.writeln('<td width="24%"><b> </b></td>')
//win.document.writeln('</tr>')
//win.document.writeln('<tr>')
//win.document.writeln('<td width="25%"><b>Client Name:</b></td>')
//win.document.writeln('<td width="70%"><b>')
//win.document.writeln(a.text2.value)
//win.document.writeln('</b></td>')
//win.document.writeln('</tr>')
//win.document.writeln('</table>')
//win.document.writeln('</form>')
//this.window.document.writeln('<font color="BLACK"><span id="needed"><document.a.listTable.text1.value></span></font>')
//this.window.document.writeln('<font color="BLACK"><span id="needed2">document.a.listTable.text1.value</span></font>')
//this.window.document.writeln('</body></html>')
textRange = document.body.createTextRange();
textRange.moveToElementText(listTable2);
textRange.execCommand("Copy"
window.open('outputExcel.xls','printing');
}
</script>
</body>
</html>