For Row = 0 To m For Col = 0 To n
strTmp = xlssheet1.Cells(Row + 1, Col + 1) '读EXCEL的某格的数据
If Len(strTmp) > 0 Then
fg.Cell(flexcpText, Row, Col) = strTmp '将数据写入到vsfg中
End If
Next Col
Next
/// 读一个353KB的EXCEL 用时 60s
/// EXCEL自己读这些数据时并显示,用时不会大于6秒// 我认为很大时间花在 xlssheet1.Cells(Row + 1, Col + 1) 语句上,
请高手帮忙,如何将用时缩短,给出一个好的方案,谢谢!!!!
谢谢!!!!
For Col = 0 To N strTmp = CStr(m)
If Len(strTmp) > 0 Then
fgExcel.Cell(flexcpText, Row, Col) = strTmp
End If
Next
frmMain.SetHelpTip "", False, True
Next
frmMain.SetHelpTip "EXCEL数据提取完成!", True//将
strTmp = xlssheet1.Cells(Row + 1, Col + 1) '读EXCEL的某格的数据
修改成
strTmp = CStr(m)则用时不到5秒一个个读取单元格,速度太慢了,如果再读一个几M的EXCEL,那可能我这个P3.0G(M)的计算机可能也要几小时。请高手出手啊!