请教一下这样写为什么是错误的?
VBScript code
<%
spArr=split(sp,",")
dim str ,crlf
crlf=chr(10)&chr(13)
y=1
for i=0 to ubound(spArr)
str=str &"<Row>"& crlf & _
"<Cell ss:MergeAcross=""5" "ss:StyleID=""s24""><Data ss:Type=""String"">"&y& "." & spArr(i) &"""</Data></Cell></Row>"& crlf
y=y+1
next
%>
显示错误:
错误类型:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/tzprice/manage/works/downexcel.asp, line 43, column 27
"<Cell ss:MergeAcross=""5" "ss:StyleID=""s24""><Data ss:Type=""String"">"&y& "." & spArr(i) &"""</Data></Cell></Row>"& crlf
--------------------------^
浏览器类型:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB7.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
------解决方案--------------------
ss:MergeAcross=""5" "
多了个空格吧
------解决方案--------------------
------解决方案--------------------字符串内的双引号要用连续两个双引号来表示。单个双引号是字符串的分界符.