vb如何生成 Html中 Table 行合并语句?
时间:2011-09-08
来源:互联网
VB code
Print #1, "<div align='left'>" Print #1, "<font color='Blue' size=3>" & "Module Pm Case Information: (Total " & Report_Summary_Case_Count_PM & " Case)" & "</font>" Print #1, "<br>" Print #1, "<table class='dataintable' border=1>" Print #1, "<tr>" Print #1, "<th align=Center>" & "Status" & "</th>" Print #1, "<th align=Center>" & "Tool" & "</th>" Print #1, "<th align=Center>" & "Module" & "</th>" Print #1, "<th align='Center'>" & "Pm Item" & "</th>" Print #1, "<th align='Center'>" & "Pm Result" & "</th>" Print #1, "<th align='Center'>" & "Parts User Info" & "</th>" Print #1, "<th align='Center'>" & "Comment" & "</th>" Print #1, "<th align='Center'>" & "Relate Picture" & "</th>" Print #1, "</tr>" For i = 0 To Report_Summary_Case_Count_PM - 1 Print #1, "<tr>" Print #1, "<td rowspan='" & Report_Summary_Case_Count_PM_Item & "'>" & Report_Summary_Case_PM_Result(i) & "</td>" Print #1, "<td rowspan='" & Report_Summary_Case_Count_PM_Item & "'>" & Mid(Report_Summary_Case_PM_CaseID(i), InStr(Report_Summary_Case_PM_CaseID(i), "@") + 1) & "</td>" For j = 0 To Report_Summary_Case_Count_PM_Item - 1 Print #1, "<td>" & Report_Summary_Case_Count_PM_Item_Module(j) & "</td>" Print #1, "<td>" & Report_Summary_Case_Count_PM_Item_Name(j) & "</td>" Print #1, "<td>" & Report_Summary_Case_Count_PM_Item_Value(j) & "</td>" Next j Print #1, "<td rowspan='" & Report_Summary_Case_Count_PM_Item & "'>" & "No Parts" & "</td>" 'Report_Summary_Case_PM_Parts(i) Print #1, "<td rowspan='" & Report_Summary_Case_Count_PM_Item & "'>" & Report_Summary_Case_PM_Comment(i) & "</td>" Print #1, "<td rowspan='" & Report_Summary_Case_Count_PM_Item & "'>" & "NO Pic" & "</td>" 'Report_Summary_Case_PM_Pic(i) Print #1, "</tr>" Next i Print #1, "</table>" Print #1, "</div>"
生成的 Html 语句:
HTML code
<div align='left'> <font color='Blue' size=3>Module Pm Case Information: (Total 1 Case)</font> <br> <table class='dataintable' border=1> <tr> <th align=Center>Status</th> <th align=Center>Tool</th> <th align=Center>Module</th> <th align='Center'>Pm Item</th> <th align='Center'>Pm Result</th> <th align='Center'>Parts User Info</th> <th align='Center'>Comment</th> <th align='Center'>Relate Picture</th> </tr> <tr> <td rowspan='4'>Y</td> <td rowspan='4'>DWPRS04</td> <td>CP1</td> <td>Change Tank Chemical(By 48H)</td> <td>ok</td> <td>CP1</td> <td>Clear All SMIF</td> <td>ok</td> <td>CP3</td> <td>Clear All Chamber</td> <td>ok</td> <td>CP1</td> <td>Clear All Chamber</td> <td>ok</td> <td rowspan='4'>"No Parts"</td> <td rowspan='4'>ok</td> <td rowspan='4'>NO Pic</td> </tr> </table> </div>
在网上看到这样的案例,这个是可以实现 合并的:
HTML code
<table border="1"> <tr> <th>www.dreamdu.com</th> <th>.com域名的数量</th> <th>.cn域名的数量</th> <th>.net域名的数量</th> <th>总数</th> </tr> <tr> <td>2003年</td> <td>1000</td> <td rowspan='2'>20tb00+5000</td> <td>3000</td> <td rowspan='3'>2u0n00</td> </tr> <tr> <td>2004年</td> <td rowspan='2'>405600+7000</td> <td>6000</td> </tr> <tr> <td>2005年</td> <td>8000</td> <td>9000</td> </tr> </table>
不知道哪里出现了细节问题?
作者: QQ342151559 发布时间: 2011-09-08
真没明白...什么合并?
你是要输出tab字符?
你是要输出tab字符?
作者: spt_petrolor 发布时间: 2011-09-09
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28