.TableCell(tcAlign, 3, 1, Trows, 1) = taCenterMiddle '第一列居中对齐 .TableCell(tcAlign, 3, 2, Trows, 2) = taLeftMiddle '第二列居中左对齐 .TableCell(tcAlign, 3, 3, Trows, 13) = taRightMiddle '其他列居中右对齐 '*************************************向每一页面添加数据************************************* iCurrent = 0 Do While Not rst.EOF iRow = iRow + 1 '当当前页面数据添加完后退出循环,开始下一页面 If iCurrent <> 0 And iCurrent Mod 18 = 0 Then Exit Do End If .TableCell(tcText, 3 + iCurrent, 1) = rst.Fields("nn") & "" .TableCell(tcText, 3 + iCurrent, 2) = rst.Fields("name") & "" .TableCell(tcText, 3 + iCurrent, 3) = formatData2(Val(rst.Fields("price1") & ""), Val(rst.Fields("unit") & "")) .TableCell(tcText, 3 + iCurrent, 4) = formatData2(Val(rst.Fields("pricerengong") & ""), Val(rst.Fields("unit") & "")) .TableCell(tcText, 3 + iCurrent, 5) = formatData2(Val(rst.Fields("pricecailiao") & ""), Val(rst.Fields("unit") & ""))
上一篇:Vb6里面数组的使用的小例子
下一篇:应用MapX编程实现地图数据查询
|