+ -
当前位置:首页 → 问答吧 → 关于 Table 的列或行合并?

关于 Table 的列或行合并?

时间:2011-09-09

来源:互联网

我用 VB 生成 Html语句:
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 语句该怎么该,然后来改 VB语句,谢谢!:


作者: QQ342151559   发布时间: 2011-09-09

在excel中排成你所需要的,然后另存为html,察看文件内容,就会看到效果。

作者: dxhdxh2k   发布时间: 2011-09-10

热门下载

更多