回复:请教问题:附脚本,Wincc中SQL数据读取到listview,然后将listview数据写入Excel中

郑州代工

  • 帖子

    30
  • 精华

    0
  • 被关注

    4

论坛等级:游侠

注册时间:2008-09-11

普通 普通 如何晋级?

发布于 2008-09-11 16:02:18

0楼

谢谢你啊,我测试通过了,用下面的语句替换原来的循环语句
For Each oItem In ListView1.ListItems
irow = irow + 1
xlSheet.Cells(irow + 2, 1).Value = oItem
xlSheet.Cells(irow + 2, 2).Value = oItem.SubItems(1)
xlSheet.Cells(irow + 2, 3).Value = oItem.SubItems(2)
xlSheet.Cells(irow + 2, 4).Value = oItem.SubItems(3)
xlSheet.Cells(irow + 2, 5).Value = oItem.SubItems(4)
xlSheet.Cells(irow + 2, 6).Value = oItem.SubItems(5)
Next



承接自动化项目编程、设计、调试。 QQ:8304368
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有32750条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
X 图片
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。