G
Guest
Hi,
I'm trying to perform a page break in excel with
Response.Write ("<tr height=17
style='page-break-before:always;height:12.75pt'><td></td></tr>");
in the following code, but with no success.
string strTableHeaders = "<tr><td>T1</td><td>T2</td><td>T3</td></tr>";
Response.Clear() ;
Response.ContentType = "application/vnd.ms-excel;charset=UTF-8";
Response.AddHeader ("Content-Disposition", "attachment;filename=Test.xls") ;
Response.Write ("<html>");
Response.Write ("<body style='FONT-size: 7.8pt; font-family: Helvetica'>");
Response.Write ("<TABLE border=0 cellPadding=1 cellSpacing=0 width='500'
style='FONT-size: 7.8pt; font-family: Arial'>");
Response.Write (strTableHeaders);
Response.Write ("<tr>");
Response.Write ("<td width='200' vAlign='top' align=left>ONE.1</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>ONE.2</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>ONE.3</TD>");
Response.Write ("</tr>");
Response.Write ("<tr style='page-break-before:always'><td></td></tr>");
Response.Write ("<td width='200' vAlign='top' align=left>TWO.1</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>TWO.2</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>TWO.3</TD>");
Response.Write ("</tr>");
Response.Write ("</table>");
Response.Flush();
Response.Write ("</body>");
Response.Write ("</html>");
Response.End() ;
Does anyone knows how to perform page-break in excel?
Thanks,
Ben
I'm trying to perform a page break in excel with
Response.Write ("<tr height=17
style='page-break-before:always;height:12.75pt'><td></td></tr>");
in the following code, but with no success.
string strTableHeaders = "<tr><td>T1</td><td>T2</td><td>T3</td></tr>";
Response.Clear() ;
Response.ContentType = "application/vnd.ms-excel;charset=UTF-8";
Response.AddHeader ("Content-Disposition", "attachment;filename=Test.xls") ;
Response.Write ("<html>");
Response.Write ("<body style='FONT-size: 7.8pt; font-family: Helvetica'>");
Response.Write ("<TABLE border=0 cellPadding=1 cellSpacing=0 width='500'
style='FONT-size: 7.8pt; font-family: Arial'>");
Response.Write (strTableHeaders);
Response.Write ("<tr>");
Response.Write ("<td width='200' vAlign='top' align=left>ONE.1</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>ONE.2</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>ONE.3</TD>");
Response.Write ("</tr>");
Response.Write ("<tr style='page-break-before:always'><td></td></tr>");
Response.Write ("<td width='200' vAlign='top' align=left>TWO.1</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>TWO.2</TD>");
Response.Write ("<td width='150' vAlign='top' align=left>TWO.3</TD>");
Response.Write ("</tr>");
Response.Write ("</table>");
Response.Flush();
Response.Write ("</body>");
Response.Write ("</html>");
Response.End() ;
Does anyone knows how to perform page-break in excel?
Thanks,
Ben