QTP_Excel Read
来源:互联网 发布:贵阳市小河区淘宝地址 编辑:程序博客网 时间:2024/05/18 23:12
' Core points of this execise:
'1. Open a Excel
'2. Catch row of one sheet
'3. Read each content of sheet
'4. Close and release
Option Explicit
Dim xlApp,xlWorkBook,xlWorkSheet
'创建Excel应用程序对象
Set xlApp=CreateObject("excel.application")
xlApp.Visible=True
'打开指定的工作簿
Set xlWorkBook=xlApp.Workbooks.Open("c:\testing.xls")
Set xlWorkSheet=xlWorkBook.Sheets("Sheet1")
'获取有效区域的行数和列数
Dim iRowCount,iColumnCount,i,j
iRowCount=xlWorkSheet.UsedRange.Rows.Count
iColumnCount=xlWorkSheet.UsedRange.Columns.Count
For i=1 To iRowCount
For j=1 To iColumnCount
MsgBox xlWorkSheet.Cells(i,j)&vbNewLine
Next
Next
'关闭工作簿
xlWorkBook.Close
'退出excel程序
xlApp.Quit
'释放excel资源
Set xlWorkSheet=Nothing
Set xlWorkBook=Nothing
Set xlApp=Nothing
- QTP_Excel Read
- QTP_Excel write
- read()
- read ()
- read
- read
- read
- read()
- read
- read
- read
- read()
- Read
- read
- read
- read
- Read read read, write write write!
- To Read
- 网站架构之缓存应用
- Python 类的定义、继承及使用对象 [转]
- 毕业设计Idota2英雄模拟器android客户端
- Android Power Management
- 转VS2010解决方案转换到VS2008
- QTP_Excel Read
- Squirrel 文档翻译( Squirrel嵌入-初始化)
- hibernate和JDBC数据访问优劣比较
- 通过对php一些服务器端特性的配置加强php的安全
- Thrift入门及Java实例演示
- Failed to install xx.apk on device 'emulator-5554': timeout
- sql 基本数据(一)
- MATLAB排序函数
- Asp.net 全局错误处理