菜单

C#将数据以XML格式写入Excel

2019年8月9日 - 奥门银河赌场网址
C#将数据以XML格式写入Excel

<h3><span>丰田汽车投资有限公司召回部分进口丰田海艾士汽车</span></h3><div
class=”timecont”><ul><li>2010年10月29日
09:41</li><li>来源:质检总局网</li></ul></div>
<div
class=”clear”></div><p>日前,丰田汽车投资有限公司向国家质量监督检验检疫总局递交了召回报告,由于传动轴箍带缺陷,拟自2010年11月15日起召回部分丰田海艾士汽车,车辆生产日期为2005年01月19日~2007年12月15日(型号为TRH213,长轴距)和2005年01月06日~2010年06月23日(型号为TRH223,超长轴距)。据该公司统计,在中国大陆地区共涉及车辆5439台(TRH213:428台,TRH223:5011台)。<br
/>  
此次缺陷是由于没有装配传动轴箍带及传动轴箍带刚性不足,不符合有关强制性标准要求,如果发生传动轴连接部位发生断裂脱落的情况,传动轴的前端部和路面有可能发生干涉,影响行车安全。<br
/>  
丰田汽车投资有限公司将对召回范围内的车辆进行检查,更换改良后的相关零部件。</p><p
style=”text-align: center”><table style=”width: 473pt;
border-collapse: collapse” border=”0″ cellspacing=”0″ cellpadding=”0″
width=”630″ x:str=””> <colgroup><col style=”width: 56pt;
mso-width-source: userset; mso-width-alt: 2368″ width=”74″ /><col
style=”width: 129pt; mso-width-source: userset; mso-width-alt: 5504″
width=”172″ /><col style=”width: 288pt; mso-width-source: userset;
mso-width-alt: 12288″ width=”384″ /></colgroup> <tbody>
<tr style=”height: 14.25pt” height=”19″> <td
style=”border-bottom: windowtext 0.5pt solid; text-align: center;
border-left: windowtext 0.5pt solid; background-color: white; width:
56pt; height: 14.25pt; border-top: windowtext 0.5pt solid; border-right:
windowtext 0.5pt solid” class=”xl24″ height=”19″
width=”74″>分类</td> <td style=”border-bottom: windowtext
0.5pt solid; text-align: center; border-left: windowtext;
background-color: white; width: 129pt; border-top: windowtext 0.5pt
solid; border-right: windowtext 0.5pt solid” class=”xl24″
width=”172″>生产日期</td> <td style=”border-bottom:
windowtext 0.5pt solid; text-align: center; border-left: windowtext;
background-color: white; width: 288pt; border-top: windowtext 0.5pt
solid; border-right: windowtext 0.5pt solid” class=”xl24″
width=”384″>修理内容</td> </tr> <tr style=”height:
14.25pt” height=”19″> <td style=”border-bottom: windowtext 0.5pt
solid; text-align: center; border-left: windowtext 0.5pt solid;
background-color: white; width: 56pt; height: 14.25pt; border-top:
windowtext; border-right: windowtext 0.5pt solid” class=”xl24″
height=”19″ width=”74″>长轴距</td> <td style=”border-bottom:
windowtext 0.5pt solid; text-align: center; border-left: windowtext;
background-color: white; width: 129pt; border-top: windowtext;
border-right: windowtext 0.5pt solid” class=”xl24″
width=”172″>2005.1.19~2007.12.15</td> <td
style=”border-bottom: windowtext 0.5pt solid; text-align: left;
border-left: windowtext; background-color: white; width: 288pt;
border-top: windowtext; border-right: windowtext 0.5pt solid”
class=”xl24″
width=”384″>把变速箱前下护板更换为传动轴护板的组合零件。</td>
</tr> <tr style=”height: 24pt” height=”32″> <td
style=”border-bottom: windowtext 0.5pt solid; text-align: center;
border-left: windowtext 0.5pt solid; background-color: white; width:
56pt; height: 24pt; border-top: windowtext; border-right: windowtext
0.5pt solid” class=”xl24″ height=”32″ width=”74″>超长</td>
<td style=”border-bottom: windowtext 0.5pt solid; text-align: center;
border-left: windowtext; background-color: white; width: 129pt;
border-top: windowtext; border-right: windowtext 0.5pt solid”
class=”xl24″ width=”172″>2005.1.6~2007.12.6</td> <td
style=”border-bottom: windowtext 0.5pt solid; text-align: left;
border-left: windowtext; background-color: white; width: 288pt;
border-top: windowtext; border-right: windowtext 0.5pt solid”
class=”xl24″
width=”384″>把变速箱前下护板更换为传动轴护板的组合零件。追加传动轴后箍带,更换燃油箱护板。</td>
</tr> <tr style=”height: 14.25pt” height=”19″> <td
style=”border-bottom: windowtext 0.5pt solid; text-align: center;
border-left: windowtext 0.5pt solid; background-color: white; width:
56pt; height: 14.25pt; border-top: windowtext; border-right: windowtext
0.5pt solid” class=”xl24″ height=”19″ width=”74″>轴距</td>
<td style=”border-bottom: windowtext 0.5pt solid; text-align: center;
border-left: windowtext; background-color: white; width: 129pt;
border-top: windowtext; border-right: windowtext 0.5pt solid”
class=”xl24″ width=”172″>2007.12.7~2010.6.23</td> <td
style=”border-bottom: windowtext 0.5pt solid; text-align: left;
border-left: windowtext; background-color: white; width: 288pt;
border-top: windowtext; border-right: windowtext 0.5pt solid”
class=”xl24″ width=”384″>更换传动轴后箍带和燃油箱护板。</td>
</tr>
</tbody></table></p><p>丰田汽车投资有限公司将以致用户信的方式直接通知客户,请客户尽快和一汽丰田经销店取得联系,预约更换时间。相关车主可直接与一汽丰田经销店联系,或致电丰田汽车顾客服务中心:800-810-1210
或 400-810-1210咨询。车主也可登陆质检总局网站进出口商品检验栏目(<a
href=”
href=”
href=”
class=”align_r”> </p><div class=”clear”></div>

 

  三、结果
图片 1
    大家直接把页面上的表格全选然后复制到Word里面即可,这里注意了,我试过直接另存为word,但是版式不对,但是直接复制到Word里面是可以的。

本文转载:

//==============================================================================
//
// 作 者:农民伯伯
// 邮 箱:over140@gmail.com
// 博 客:
// 时 间:2009-9-9
// 描 述:获取SQL SERVER 元数据
//
//==============================================================================

c#将数据导入Excel另类方法

今天公司突然给个Excel模版,要将数据导入。这方法网上应该一搜一大把,但奇怪的是找了几种方法居然不理想。其中有一篇,大概是讲用模版且分页导出Excel。试了作者的例子。使用它提供的方法必须分页,每页25条,多了还不行。显示不符合我的要求。

使用ASP.NET中的DATAGRID控件可以使用导出Excel。但其导出的本质是Response一段HTML代码,并且设置输出类型为Excel即可。其实这种方法与控件没有关系,换言之,只要你设置了HTML代码,以Excel类型输出到页面,即可实现任意你想要的格式。

但现在的问题是这个格式
可能并不是你的HTML代码在页面上体现的形式,因为你定义的CSS可能输出到Excel它并不支持。那么怎么办呢?

我突然想到Excel要是有导出HTML功能岂不美栽?打开Excel。点击
文件。出现在菜单中 出现了 另存为网页。在接下来出现的对话框中 选择
工作表,而不要选择
整体工作薄,因为如果选择整个工作薄,这样导出后它会将CSS存为单独文件。我们稍后使用使用起来不便。

选择保存后,会生成一个单一的HTML文件,并且CSS样式都有,这里的CSS样式很重要,它在Excel中会得到支持。

然后我们可以读取这个HTML代码,需要注意的是,需要先把<html</html>这二个标记去掉。否则输出不了Excel。同时最好去掉这些代码中的JS代码。

然后你可以将你的数据读取放入到DataTable中,然后循环<tr>放入,即可!

下面给出一个示例代码。

 

图片 2
private string data()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            #region 样式
            sb.Append(“<head>”);
            sb.Append(“<meta http-equiv=Content-Type content=\”text/html; charset=gb2312\”> “);
            sb.Append(“<style id=\”主要银行理财产品调研0901-0907第一期_31508_Styles\”>”);
            sb.Append(“<!–table”);
            sb.Append(”    {mso-displayed-decimal-separator:\”\\.\”;”);
            sb.Append(”    mso-displayed-thousand-separator:\”\\,\”;}”);
            sb.Append(“.font531508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:9.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;}”);
            sb.Append(“.font631508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;}”);
            sb.Append(“.font731508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:11.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;}”);
            sb.Append(“.font831508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;}”);
            sb.Append(“.font931508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;}”);
            sb.Append(“.font1031508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”\\000B \”, sans-serif;”);
            sb.Append(”    mso-font-charset:0;}”);
            sb.Append(“.font1131508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\\02CE\\0325, sans-serif;”);
            sb.Append(”    mso-font-charset:0;}”);
            sb.Append(“.font1231508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\\02CE\\0325, sans-serif;”);
            sb.Append(”    mso-font-charset:0;}”);
            sb.Append(“.font1331508”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;}”);
            sb.Append(“.xl2431508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl2531508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl2631508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl2731508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl2831508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:Percent;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:top;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl2931508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:Percent;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl3031508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl3131508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”\\000B \”, sans-serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl3231508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\\02CE\\0325, sans-serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl3331508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl3431508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:Percent;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl3531508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:top;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl3631508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:top;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl3731508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:\”m\\0022月\\0022d\\0022日\\0022\”;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl3831508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:Percent;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl3931508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\\02CE\\0325, sans-serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl4031508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl4131508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:right;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl4231508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:0%;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl4331508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\\02CE\\0325, sans-serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl4431508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl4531508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl4631508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:right;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl4731508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl4831508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:none;”);
            sb.Append(”    border-left:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl4931508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:none;”);
            sb.Append(”    border-left:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl5031508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:none;”);
            sb.Append(”    border-left:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl5131508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:none;”);
            sb.Append(”    border-left:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl5231508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:Percent;”);
            sb.Append(”    text-align:left;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:none;”);
            sb.Append(”    border-left:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl5331508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:none;”);
            sb.Append(”    border-left:.5pt solid windowtext;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“.xl5431508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:general;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:.5pt solid windowtext;”);
            sb.Append(”    border-right:.5pt solid windowtext;”);
            sb.Append(”    border-bottom:.5pt solid windowtext;”);
            sb.Append(”    border-left:none;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:normal;}”);
            sb.Append(“.xl5531508”);
            sb.Append(”    {padding-top:1px;”);
            sb.Append(”    padding-right:1px;”);
            sb.Append(”    padding-left:1px;”);
            sb.Append(”    mso-ignore:padding;”);
            sb.Append(”    color:windowtext;”);
            sb.Append(”    font-size:10.0pt;”);
            sb.Append(”    font-weight:700;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:\”Times New Roman\”, serif;”);
            sb.Append(”    mso-font-charset:0;”);
            sb.Append(”    mso-number-format:General;”);
            sb.Append(”    text-align:center;”);
            sb.Append(”    vertical-align:middle;”);
            sb.Append(”    border-top:none;”);
            sb.Append(”    border-right:none;”);
            sb.Append(”    border-bottom:.5pt solid windowtext;”);
            sb.Append(”    border-left:none;”);
            sb.Append(”    background:white;”);
            sb.Append(”    mso-pattern:auto none;”);
            sb.Append(”    white-space:nowrap;}”);
            sb.Append(“ruby”);
            sb.Append(”    {ruby-align:left;}”);
            sb.Append(“rt”);
            sb.Append(”    {color:windowtext;”);
            sb.Append(”    font-size:9.0pt;”);
            sb.Append(”    font-weight:400;”);
            sb.Append(”    font-style:normal;”);
            sb.Append(”    text-decoration:none;”);
            sb.Append(”    font-family:宋体;”);
            sb.Append(”    mso-generic-font-family:auto;”);
            sb.Append(”    mso-font-charset:134;”);
            sb.Append(”    mso-char-type:none;}”);
            sb.Append(“–>”);
            sb.Append(“</style>”);
            sb.Append(“</head>”);
            sb.Append(“<body>”);
            sb.Append(“<!–[if !excel]>  <![endif]–>”);
            sb.Append(“<!–下列信息由 Microsoft Office Excel 的“发布为网页”向导生成。–>”);
            sb.Append(“<!–如果同一条目从 Excel 中重新发布,则所有位于 DIV 标记之间的信息均将被替换。–>”);
            sb.Append(“<!—————————–>”);
            sb.Append(“<!–“从 EXCEL 发布网页”向导开始–>”);
            sb.Append(“<!—————————–>”);
            sb.Append(“<div id=\”主要银行理财产品调研0901-0907第一期_31508\” align=center x:publishsource=\”Excel\”>”);
            sb.Append(“<table x:str border=0 cellpadding=0 cellspacing=0 width=1815 class=xl2631508”);
            sb.Append(” style=’border-collapse:collapse;table-layout:fixed;width:1362pt’>”);
            sb.Append(” <col class=xl2631508 width=86 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 2752;width:65pt’>”);
            sb.Append(” <col class=xl2631508 width=82 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 2624;width:62pt’>”);
            sb.Append(” <col class=xl3931508 width=497 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 15904;width:373pt’>”);
            sb.Append(” <col class=xl3931508 width=54 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 1728;width:41pt’>”);
            sb.Append(” <col class=xl3931508 width=184 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 5888;width:138pt’>”);
            sb.Append(” <col class=xl2631508 width=111 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 3552;width:83pt’>”);
            sb.Append(” <col class=xl2631508 width=234 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 7488;width:176pt’>”);
            sb.Append(” <col class=xl4031508 width=63 span=2 style=’mso-width-source:userset;”);
            sb.Append(” mso-width-alt:2016;width:47pt’>”);
            sb.Append(” <col class=xl4131508 width=63 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 2016;width:47pt’>”);
            sb.Append(” <col class=xl4031508 width=141 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 4512;width:106pt’>”);
            sb.Append(” <col class=xl2631508 width=63 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 2016;width:47pt’>”);
            sb.Append(” <col class=xl4031508 width=63 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 2016;width:47pt’>”);
            sb.Append(” <col class=xl2631508 width=111 style=’mso-width-source:userset;mso-width-alt:”);
            sb.Append(” 3552;width:83pt’>”);
            sb.Append(” <tr height=17 style=’height:12.75pt’>”);
            sb.Append(”  <td colspan=3 height=17 class=xl5531508 width=665 style=’height:12.75pt;”);
            sb.Append(”  width:500pt’>9<font class=\”font831508\”>月</font><font class=\”font1331508\”>15</font><font”);
            sb.Append(”  class=\”font831508\”>日</font><font class=\”font1331508\”>-9</font><font”);
            sb.Append(”  class=\”font831508\”>月</font><font class=\”font1331508\”>22</font><font”);
            sb.Append(”  class=\”font831508\”>日销售产品</font></td>”);
            sb.Append(”  <td class=xl3931508 width=54 style=’width:41pt’> </td>”);
            sb.Append(”  <td class=xl3931508 width=184 style=’width:138pt’> </td>”);
            sb.Append(”  <td class=xl2631508 width=111 style=’width:83pt’> </td>”);
            sb.Append(”  <td class=xl2631508 width=234 style=’width:176pt’> </td>”);
            sb.Append(”  <td class=xl4031508 width=63 style=’width:47pt’> </td>”);
            sb.Append(”  <td class=xl4031508 width=63 style=’width:47pt’> </td>”);
            sb.Append(”  <td class=xl4131508 width=63 style=’width:47pt’> </td>”);
            sb.Append(”  <td class=xl4031508 width=141 style=’width:106pt’> </td>”);
            sb.Append(”  <td class=xl2631508 width=63 style=’width:47pt’> </td>”);
            sb.Append(”  <td class=xl4031508 width=63 style=’width:47pt’> </td>”);
            sb.Append(”  <td class=xl2631508 width=111 style=’width:83pt’> </td>”);
            sb.Append(” </tr>”);
            #endregion 
            

            //表头
            sb.Append(” <tr height=16 style=’height:12.0pt’>”);
            sb.Append(”  <td height=16 class=xl2431508 style=’height:12.0pt;border-top:none’>发行机构</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’>产品类型</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’>产品名称</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>币种</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>产品风险收益类型</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>产品投资标的</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>募集期</td>”);
            sb.Append(”  <td class=xl2531508 width=63 style=’border-left:none;width:47pt’>期限</td>”);
            sb.Append(”  <td class=xl2531508 width=63 style=’border-left:none;width:47pt’>期限单位</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>预期年化<span style=’display:none’>收益率</span></td>”);
            sb.Append(”  <td class=xl2531508 width=141 style=’border-left:none;width:106pt’>起点金额</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>额度</td>”);
            sb.Append(”  <td class=xl2531508 width=63 style=’border-left:none;width:47pt’>额度单位</td>”);
            sb.Append(”  <td class=xl2531508 width=63 style=’border-left:none;width:47pt’>管理费用</td>”);
            sb.Append(”  <td class=xl2431508 style=’border-left:none’>备注</td>”);
            sb.Append(” </tr>”);

            //数据

            string constr = System.Configuration.ConfigurationSettings.AppSettings.Get(“ConnectionString”);

            string sql = “select   fxjg as 发行机构,InvestType as 产品类型,cpmc as 产品名称,bz as 币种,cptype as 产品风险收益类型,InvestType as 产品投资标的,rgqsr as 认购起始日期, rgjsr as 认购结束日,wtglqsearch as 期限,’天’ as 期限单位, Yqnsyl as 预期年化收益率,Rgqsje as 认购起始金额,Rgdzje as 认购递增金额 ,glfy as 管理费用,cpsm as 产品说明 from QsqBankProduct where rgqsr>=’2008-09-15′ and rgqsr<‘2008-09-22’ order by fxjg”;
            SqlConnection con = new SqlConnection(constr);
            con.Open();
            SqlCommand cmd = new SqlCommand(sql,con);
            DataTable dt = new DataTable();
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(dt);

            con.Close();
            for(int i = 0 ; i < dt.Rows.Count;i++)
            {
                string cptype = dt.Rows[i][“产品风险收益类型”].ToString();
                if(cptype == “1”)
                    cptype = “保本固定收益型”;
                else if(cptype == “2”)
                    cptype = “保本浮动收益型”;
                else if(cptype == “3”)
                    cptype = “非保本浮动收益型”;

                string Yqnsyl=dt.Rows[i][“预期年化收益率”].ToString();
                if(Yqnsyl.IndexOf(“.”)!=-1 && Yqnsyl.Substring(Yqnsyl.IndexOf(“.”)).Length > 4)
                    Yqnsyl = Yqnsyl.Substring(0,Yqnsyl.IndexOf(“.”)+3);

                string memo = dt.Rows[i][“产品说明”].ToString();
                memo=Components.Formater.FormatDeleteHtml(memo);

                string glfy = Components.Formater.FormatDeleteHtml(dt.Rows[i][“管理费用”].ToString());
                    

                sb.Append(” <tr height=25 style=’height:25pt’>”);
                sb.Append(”  <td height=17 class=xl2431508 style=’height:12.75pt;border-top:none’>”+dt.Rows[i][“发行机构”]+”</td>”);
                sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’>”+dt.Rows[i][“产品类型”]+”</td>”);
                sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’>”+dt.Rows[i][“产品名称”]+”</td>”);
                sb.Append(”  <td class=xl2531508 width=54 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:41pt’>”+dt.Rows[i][“币种”]+”</td>”);
                sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’>”+cptype+”</td>”);
                sb.Append(”  <td class=xl2531508 width=111 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:83pt’>”+dt.Rows[i][“产品投资标的”]+”</td>”);
                sb.Append(”  <td class=xl2731508 width=234 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:176pt’>”+dt.Rows[i][“认购起始日期”]+”<font”);
                sb.Append(”  class=\”font631508\”>到</font>”+dt.Rows[i][“认购结束日”]+”</td>”);
                sb.Append(”  <td class=xl2731508 width=63 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:47pt’ x:num>”+dt.Rows[i][“期限”]+”</td>”);
                sb.Append(”  <td class=xl2531508 width=63 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:47pt’>”+dt.Rows[i][“期限单位”]+”</td>”);
                sb.Append(”  <td class=xl2831508 width=63 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:47pt’>”+Yqnsyl+”</td>”);
                sb.Append(”  <td class=xl2531508 width=141 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:106pt’>起点 “+dt.Rows[i][“认购起始金额”]+”,每”+dt.Rows[i][“认购递增金额”]+”递增</td>”);
                sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’ x:num> </td>”);
                sb.Append(”  <td class=xl2531508 width=63 style=’border-top:none;border-left:none;”);
                sb.Append(”  width:47pt’> </td>”);                
                sb.Append(”  <td class=xl2531508 width=63 style=’border-left:none;width:47pt’>”+glfy+”</td>”);
                sb.Append(”  <td class=xl2431508 style=’border-top:none;border-left:none’> ”+memo+”</td>”);
                sb.Append(” </tr>”);
            }
            sb.Append(” <![if supportMisalignedColumns]>”);
            sb.Append(” <tr height=0 style=’display:none’>”);
            sb.Append(”  <td width=86 style=’width:65pt’></td>”);
            sb.Append(”  <td width=82 style=’width:62pt’></td>”);
            sb.Append(”  <td width=497 style=’width:373pt’></td>”);
            sb.Append(”  <td width=54 style=’width:41pt’></td>”);
            sb.Append(”  <td width=184 style=’width:138pt’></td>”);
            sb.Append(”  <td width=111 style=’width:83pt’></td>”);
            sb.Append(”  <td width=234 style=’width:176pt’></td>”);
            sb.Append(”  <td width=63 style=’width:47pt’></td>”);
            sb.Append(”  <td width=63 style=’width:47pt’></td>”);
            sb.Append(”  <td width=63 style=’width:47pt’></td>”);
            sb.Append(”  <td width=141 style=’width:106pt’></td>”);
            sb.Append(”  <td width=63 style=’width:47pt’></td>”);
            sb.Append(”  <td width=63 style=’width:47pt’></td>”);
            sb.Append(”  <td width=111 style=’width:83pt’></td>”);
            sb.Append(” </tr>”);
            sb.Append(” <![endif]>”);
            sb.Append(“</table>”);
            sb.Append(“</div>”);
            sb.Append(“<!—————————–>”);
            sb.Append(“<!–“从 EXCEL 发布网页”向导结束–>”);
            sb.Append(“<!—————————–>”);
            sb.Append(“</body>”);

            return sb.ToString();
        }

 

注意上面很多代码,并不是我一行行写的,这是很不明智的方法,HTML代码是从Excel是导出的,而一行行变成sb.Append形式是通过工具生成的。这工具不难,自己都可以写一个。注意上面//数据区域,是读取数据库,然后一行行循环。最后调用如下方式输出即可。

 

图片 3

private void Page_Load(object sender, System.EventArgs e)
        {
            Response.Clear();
            Response.Buffer = true;
            Response.Charset = “GB2312”;
            Response.ContentEncoding = System.Text.Encoding.GetEncoding(“gb2312”);//设置输出流为简体中文 
            Response.AppendHeader(“Content-Disposition”, “attachment;filename=cnqsq.xls”);

            Response.ContentType = “application/ms-excel”;

            EnableViewState = false;
            Response.Write(data()); 
            Response.End();

        }

图片 4

 

示例代码就不给出了,因为主要是方法。提供方法思路,相信实现起来并不难。

图片 5

前言
  在小公司待过的朋友可能常常会碰到收烂摊子的事情,比如程序写完了,没有文档,尤其是数据库文档,那么你接受的第一件事情可能就是数据库文档了,如果按一个个表一个个字段来复制来写文档的话表一多估计会累死,而且容易出错,还得反复校验,且枯燥无味,这里我写了一个小程序来帮助大家快速准确的来完成这一任务。

public sealed class SqlSchemaProvider
{

    #endregion

    #endregion

正文
  一、目标
    下图是我们要实现的目标:图片 6
  二、实现
    原理非常简单,首先制作样式模版,可以参照文章2,将排版好的Word另存为html,然后复制粘贴到aspx页面中,然后从数据库读取表以及字段信息,动态的插入表名和字段信息。
    2.1  SqlSchemaProvider.cs

/// <summary>
///ColumnInfo 的摘要说明
/// </summary>
public class ColumnInfo
{
    public ColumnInfo()
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
    }

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>

        SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder(ConnectString);

    private string GetCSharpType(string type)
    {
        if (string.IsNullOrEmpty(type))
            return “string”;

        return result.ToString();
    }

<html>
<head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
    <meta name=”Generator” content=”Microsoft Word 11 (filtered)”>
    <title>数据库文档</title>
    <style>
        <!– 
        /* Font Definitions */ 
        @font-face
        {
            font-family: 宋体;
            panose-1: 2 1 6 0 3 1 1 1 1 1;
        }
        @font-face
        {
            font-family: 楷体_GB2312;
            panose-1: 2 1 6 9 3 1 1 1 1 1;
        }
        @font-face
        {
            font-family: “\@宋体”;
            panose-1: 2 1 6 0 3 1 1 1 1 1;
        }
        @font-face
        {
            font-family: “\@楷体_GB2312”;
            panose-1: 2 1 6 9 3 1 1 1 1 1;
        }
        /* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal
        {
            margin: 0cm;
            margin-bottom: .0001pt;
            text-align: justify;
            text-justify: inter-ideograph;
            font-size: 10.5pt;
            font-family: “Times New Roman”;
        }
        p.MsoFooter, li.MsoFooter, div.MsoFooter
        {
            margin: 0cm;
            margin-bottom: .0001pt;
            layout-grid-mode: char;
            font-size: 9.0pt;
            font-family: “Times New Roman”;
        }
        /* Page Definitions */@page Section1
        {
            size: 595.3pt 841.9pt;
            margin: 72.0pt 90.0pt 72.0pt 90.0pt;
            layout-grid: 15.6pt;
        }
        div.Section1
        {
            page: Section1;
        }
        — ></style>
</head>
<body lang=”ZH-CN” style=’text-justify-trim: punctuation’>
    <div class=”Section1″ style=’layout-grid: 15.6pt’>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal” align=”center” style=’text-align: center’>
            <span lang=”EN-US” style=’font-size: 42.0pt’> </span></p>
        <p class=”MsoNormal” align=”center” style=’text-align: center’>
            <span lang=”EN-US” style=’font-size: 42.0pt’> </span></p>
        <p class=”MsoNormal” align=”center” style=’text-align: center’>
            <span style=’font-size: 42.0pt; font-family: 楷体_GB2312′>数据库文档</span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
        <div align=”center”>
            <table class=”MsoTableGrid” border=”1″ cellspacing=”0″ cellpadding=”0″ style=’margin-left: 34.6pt;
                border-collapse: collapse; border: none’>
                <tr style=’height: 15.6pt’>
                    <td width=”85″ valign=”top” style=’width: 64.0pt; border: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span style=’font-family: 宋体’>版本号</span></p>
                    </td>
                    <td width=”131″ valign=”top” style=’width: 98.6pt; border: solid windowtext 1.0pt;
                        border-left: none; padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span style=’font-family: 宋体’>日期</span></p>
                    </td>
                    <td width=”132″ valign=”top” style=’width: 98.65pt; border: solid windowtext 1.0pt;
                        border-left: none; padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span style=’font-family: 宋体’>负责人</span></p>
                    </td>
                    <td width=”132″ valign=”top” style=’width: 98.65pt; border: solid windowtext 1.0pt;
                        border-left: none; padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span style=’font-family: 宋体’>备注</span></p>
                    </td>
                </tr>
                <tr style=’height: 15.6pt’>
                    <td width=”85″ valign=”top” style=’width: 64.0pt; border: solid windowtext 1.0pt;
                        border-top: none; padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”>0.1</span></p>
                    </td>
                    <td width=”131″ valign=”top” style=’width: 98.6pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”>2009-9-9</span></p>
                    </td>
                    <td width=”132″ valign=”top” style=’width: 98.65pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span style=’font-family: 宋体’>农民伯伯</span></p>
                    </td>
                    <td width=”132″ valign=”top” style=’width: 98.65pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”> </span></p>
                    </td>
                </tr>
                <tr style=’height: 15.6pt’>
                    <td width=”85″ valign=”top” style=’width: 64.0pt; border: solid windowtext 1.0pt;
                        border-top: none; padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”> </span></p>
                    </td>
                    <td width=”131″ valign=”top” style=’width: 98.6pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”> </span></p>
                    </td>
                    <td width=”132″ valign=”top” style=’width: 98.65pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”> </span></p>
                    </td>
                    <td width=”132″ valign=”top” style=’width: 98.65pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;
                        padding: 0cm 5.4pt 0cm 5.4pt; height: 15.6pt’>
                        <p class=”MsoNormal” align=”center” style=’text-align: center’>
                            <span lang=”EN-US”> </span></p>
                    </td>
                </tr>
            </table>
        </div>
        
        <asp:Repeater ID=”rptData” runat=”server”>
            <HeaderTemplate>
            </HeaderTemplate>
            <ItemTemplate>
                <p class=”MsoNormal”><span lang=”EN-US”> </span></p>
                <p class=”MsoNormal”><span lang=”EN-US”> </span></p>
        
                <p class=”MsoNormal”>
                    <b><span style=’font-size: 12.0pt; font-family: 宋体’>表</span></b><b><span lang=”EN-US”
                        style=’font-size: 12.0pt’>  </span></b><b><span style=’font-size: 12.0pt; font-family: 宋体’>
                            名:</span></b><b><span lang=”EN-US” style=’font-size: 12.0pt’><%#Container.DataItem%></span></b></p>
                <p class=”MsoNormal”>
                    <b><span style=’font-size: 12.0pt; font-family: 宋体; background: yellow’>表说明:</span></b></p>
        <table class=”MsoTableGrid” border=”1″ cellspacing=”0″ cellpadding=”0″ style=’border-collapse: collapse;
            border: none’>
            <tr>
                <td width=”130″ valign=”top” style=’width: 97.7pt; border: solid windowtext 1.0pt;
                    background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>字段名</span></p>
                </td>
                <td width=”81″ valign=”top” style=’width: 60.95pt; border: solid windowtext 1.0pt;
                    border-left: none; background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>数据类型</span></p>
                </td>
                <td width=”50″ valign=”top” style=’width: 37.3pt; border: solid windowtext 1.0pt;
                    border-left: none; background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>长度</span></p>
                </td>
                <td width=”67″ valign=”top” style=’width: 49.95pt; border: solid windowtext 1.0pt;
                    border-left: none; background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>允许空</span></p>
                </td>
                <td width=”67″ valign=”top” style=’width: 49.95pt; border: solid windowtext 1.0pt;
                    border-left: none; background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>默认值</span></p>
                </td>
                <td width=”88″ valign=”top” style=’width: 65.85pt; border: solid windowtext 1.0pt;
                    border-left: none; background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>其他</span></p>
                </td>
                <td width=”86″ valign=”top” style=’width: 64.4pt; border: solid windowtext 1.0pt;
                    border-left: none; background: #E0E0E0; padding: 0cm 5.4pt 0cm 5.4pt’>
                    <p class=”MsoNormal” align=”center” style=’text-align: center’>
                        <span style=’font-family: 宋体’>字段说明</span></p>
                </td>
            </tr>
            <%# ColumnInfo(Container.DataItem.ToString()) %>
            </table>
            </ItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:Repeater>
           
        <p class=”MsoNormal”>
            <span lang=”EN-US”> </span></p>
    </div>
</body>
</html>

    private string OutputValue(string obj)
    {
        if (string.IsNullOrEmpty(obj))
            return ” “;
        else
            return obj;
    }

    #endregion

    public SqlSchemaProvider(string connectstring)
    {
        ConnectString = connectstring;
    }

}

    代码说明:
      这里是嵌套输出的表格,注意处理为空的情况,否则表格可能不完整,大家可以根据实际情况进行修改。

    #region Type Maps

        using (SqlConnection conn = new SqlConnection(scsb.ConnectionString))
        {
            conn.Open();
            SqlCommand cmd = new SqlCommand(SQL2000_GetTableColumns, conn);
            cmd.Parameters.Add(new SqlParameter(“@DatabaseName”, scsb.InitialCatalog));
            cmd.Parameters.Add(new SqlParameter(“@SchemaName”, “dbo”));
            cmd.Parameters.Add(new SqlParameter(“@TableName”, tableName));
            SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            while (reader.Read())
            {
                result.Add(new ColumnInfo()
                {
                    Name = reader.GetString(0),
                    DataType = reader.GetString(1),
                    Length = reader.GetInt32(3),
                    Nullable = reader.GetString(6).Trim().Equals(“YES”) ? true : false,
                    DefaultValue = reader.IsDBNull(7) ? “” : reader[7].ToString(),
                    Identity = reader.GetInt32(8),
                    IdentitySeed = Convert.ToInt32(reader.GetString(12)),
                    IdentityIncrement = Convert.ToInt32(reader.GetString(13)),
                    ColumnDesc = reader.GetString(17)
                });
            }
            reader.Close();
        }

            default:
                reval = “string”;
                break;
        }
        return reval;
    }

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图