Html报表用Excel打开保持表格线【Html报表模板】

注:本人调试的最简版,前两处红色部分是为了输出Excel表格线;x:str表示输出为文本样式,避免被输出为科学计数法。

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>XX银行业务状况表</title>
<!--[if gte mso 9]>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>XX银行业务状况表</x:Name>
<x:WorksheetOptions>
<x:Selected />
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
<![endif]-->
<style type="text/css">
<!--
table { font-family: Arial; font-size: 9pt; border-collapse:collapse; width: 270mm; min-width: 270mm; max_width: 270mm; }
.title { text-align:center; font-size:25px; font-weight:bold; padding:25px; }
.tblborder td { border:0.5pt solid #000000; border-collapse:collapse; width:100px; }
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
-->
</style>
</head>
<body>
<table>
<tr>
<td colspan="9" class="title">XX银行业务状况表</td>
</tr>
<tr>
<td width="33%">城区支行日报</td>
<td width="33%">报表日期:XXXX 至 XXXX</td>
<td class="right">币种:人民币元</td>
</tr>
</table>
<table class="tblborder">
<tr class="center">
<td rowspan="2">项目代号</td>
<td rowspan="2">项目名称</td>
<td colspan="2">期初余额</td>
<td colspan="2">本期发生额</td>
<td colspan="2">期末余额</td>
<td rowspan="2">项目代号</td>
</tr>
<tr class="center">
<td>借方</td>
<td>贷方</td>
<td>借方</td>
<td>贷方</td>
<td>借方</td>
<td>贷方</td>
</tr>
<tr>
<td>10</td>
<td>一、资产类</td>
<td class="right" x:str>100861008610086</td>
<td class="right" x:str>100101001010010</td>
<td class="right" x:str>000000000000000</td>
<td class="right" x:str>111111111111111</td>
<td class="right" x:str>100001000010000</td>
<td class="right" x:str>777777777777777</td>
<td>10</td>
</tr>
<tr>
<td>1001</td>
<td>现金</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>1001</td>
</tr>
<tr>
<td>100</td>
<td>合计</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>100</td>
</tr>
</table>
<table>
<tr>
<td width="25%">行长(主任):</td>
<td width="25%">处(科)长:</td>
<td width="25%">复核:</td>
<td width="25%">制表:</td>
</tr>
</table>
</body>
</html>

posted @ 2014-08-12 00:05  新新向荣  阅读(705)  评论(0编辑  收藏  举报