跟谢txt文件是一样的,我给你写txt的代码,你看一下就明白了
Dim liFilenumber As Integer
liFilenumber = FreeFile
Open "c\out\test.txt" For Output As #liFilenumber
Print #liFilenumber, "这里是第一行"
Print #liFilenumber, GetCurrents(NulltoString(lrRec.Fields("ProdId")), Const_prodid_L)
Close #liFilenumber