|
各位老师好:
问题:
Public Sub test2()
str1 = ""
For a = 1 To 187
If a < 187 Then
str1 = str1 & Mid(Sheet1.Cells(a, 1), 2) & ","
Else: str1 = str1 & Mid(Sheet1.Cells(a, 1), 2)
End If
Next
Dim ws As Object
Dim ex As Object
Set ws = CreateObject("wscript.shell")
Set ex = ws.Exec("cmd /c ws.exe -n -1 -B 1048576 wss://vts.igiseis.com/pingtai/position?cookieId=d9375042-e71a-4998-8635-76c5636ba610")
ex.StdIn.Write "{'action':'sim_company_car_list','phone':'" & str1 & "','companyId':'518622737851658240'}" & vbCrLf
str2 = ""
Do Until ex.Stdout.atendofstream
str2 = str2 & ex.Stdout.Readline
Loop
Open ThisWorkbook.Path & "\ws.txt" For Output As #1
Print #1, str2
Close #1
MsgBox str2
End Sub
这个代码在输出保存的时候存在中文乱码的情况,现在求解
以下是附件,压缩包里是 ws.exe test2.xlsm
test2.rar
(746.8 KB, 下载次数: 6)
因涉及cookie,所以各位老师如果想实际使用,还需私聊我vx:15584598
|
|