sub streamread()
dim rline as string
dim idx as long
open activeworkbook.path & "/stream read.csv" for input as #1
do while not eof(1)
line input #1, rline
idx = idx + 1
loop
close #1
end sub
大型文件逐行讀取方法。
sub streamread()
dim rline as string
dim idx as long
open activeworkbook.path & "/stream read.csv" for input as #1
do while not eof(1)
line input #1, rline
idx = idx + 1
loop
close #1
end sub
大型文件逐行讀取方法。
VBA語句 一、VBA語句 1.宏程序語句 運行後可 以完成一個功能。 `//給單元格a1賦值 Sub test() //開始語句 Range("a1") = 10 //程序主體 End Sub
一、判斷語句 1. iF判斷 //單條件判斷 Sub 判斷1() If Range("a1").Value > 0 Then Range("b1") = "A1的值是正數" Else R