当我从自动脚本中调用它时,它无法说“9下标超出范围”
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\docstore\testinganywhere\spreadsheets\ccm_cases.xls")
Dim myVar
Dim dataArray
Set objArgs = WScript.Arguments
'objArgs Sample Data = "LNK^CPRSDONOTUSER,ONE 5018^06/01/2010 09:00^CHECKED OUT^NSC, VA PENSION^X^XRAY^474-TROY^CPRSPHYSICIAN,ONE^No patient insurance data on file.^No entry on file.^NA^No visit notes on file.^CPRSPHYSICIAN,ONE^LEGAL REFERRED TO CODING^NORMAL^10/22/2013 14:09^09/29/2010 14:33^99215;99214;84443;88000^074.0;V08.;305.1^X^X^X^X^UR^URComment^Not Vested"
msgbox objArgs(0)
dataArray = Split(objArgs(0),"^")
objExcel.DisplayAlerts = 0
workSheetCount = objExcel.Worksheets.Count
Dim visitDateTime
Dim patientName
patientName = dataArray(1)
'The script fails after here
visitDateTime = dataArray(2)
即使我知道我传入一个非常长的字符串,“msgbox objArgs(0)”中显示的唯一内容是“LNK ^ CPRSDONOTUSER,ONE”。它似乎与“ONE”和“5018”之间的空间有关。
如何传入整个字符串?