'打开Excel文件 Excel.Open('文件路径')

'获取行数和列数 rows = Excel.GetRowCount() cols = Excel.GetColumnCount()

'循环读取每一行的数据 For i = 1 To rows col1 = Excel.ReadData(i, 1) '第一列 col2 = Excel.ReadData(i, 2) '第二列 col3 = Excel.ReadData(i, 3) '第三列

'在这里可以对读取到的数据进行处理

Next

'关闭Excel文件 Excel.Close()


原文地址: https://www.cveoy.top/t/topic/loGV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录