转载自:https://www.cnblogs.com/waver/articles/1283842.html- FUNCTION READ4(FPATH)
- DIM ADOS
- SET ADOS = CREATEOBJECT("ADODB.STREAM")
-
- WITH ADOS
- .CHARSET = "UTF-8"
- .TYPE = 2
- .OPEN
- .LOADFROMFILE FPATH
- READ4 = .READTEXT
- .CLOSE
- END WITH
- SET ADOS = NOTHING
- END FUNCTION
-
-
- SUB WRITE1291(S1223)
- DIM ADOS
- SET ADOS = CREATEOBJECT("ADODB.STREAM")
-
- WITH ADOS
- .TYPE = 2
- .MODE = 3
- .CHARSET = "UTF-8"
- .OPEN
- .WRITETEXT S1223
- .SAVETOFILE "EXTRACTS221114-2.CSV.TXT",2
- END WITH
- SET ADOS = NOTHING
- END SUB
-
-
-
- SUB APPEND4210321(S1419)
- DIM X
- X = READ4("EXTRACTS221114-2.CSV.TXT")
- WRITE1291 X & VBCRLF & S1419
- END SUB
复制代码 追加写入似乎只能这样实现? |