chr(34)表示单引号(即chr(34)=" ),用引入变量的方式引入单引号
如:
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso =
CreateObject("Scripting.FileSystemObject")
Set f =
fso.OpenTextFile("E:\VBS\qj\bzn_200people_config.txt",8,true)
For i = 1 to 2000
para =
"{"&chr(34)&"birthDate"&chr(34)&":"&chr(34)&"19620607"&chr(34)&","&chr(34)&"certNo"&chr(34)&":"&chr(34)&"432503198709282805"&chr(34)&","&chr(34)&"certType"&chr(34)&":"&chr(34)&"ID_CARD"&chr(34)&","&chr(34)&"contactNo"&chr(34)&":"&chr(34)&"13111111111"&chr(34)&","&chr(34)&"jobCode"&chr(34)&":"&chr(34)&"OCC_CD_00021"&chr(34)&","&chr(34)&"monthlySalary"&chr(34)&":2100,"&chr(34)&"name"&chr(34)&":"&chr(34)&"两千人"&i&""&chr(34)&","&chr(34)&"physicalStatus"&chr(34)&":"&chr(34)&"PHY_STA_0002"&chr(34)&","&chr(34)&"jobCompany"&chr(34)&":"&chr(34)&"所属公司2018102313123701"&chr(34)&","&chr(34)&"salaryCurrency"&chr(34)&":"&chr(34)&"CNY"&chr(34)&","&chr(34)&"sex"&chr(34)&":"&chr(34)&"F"&chr(34)&"},"
f.Write para&vbCr
next
f.Close
加载中,请稍候......