急ole对象 操作EXCEL导入数据表数据失败,提示cann't convert double in any variable to string

在线等 急!!ole对象 操作EXCEL导入数据表数据失败,提示cann't convert double in any variable to st

在线等 急!!ole对象 操作EXCEL导入数据表数据失败,提示cann't convert double in any variable to string
string test ,doc
integer i,j
oleobject xlapp,xlsub
string n,name,p
i=GetFileopenName("Select File",doc, test, "xls", "Text Files (*.xls),*.xls," )
xlapp= create oleobject
if i=1 then
j=xlapp.connecttonewobject("excel.application")
if j<>0 then
messagebox("error","cann't l excle application")
return
end if 
else
messagebox("error","cann't open file")
return
end if 
openwithparm(w_message,"数据加载中")
w_message.st_1.text="数据加载中"
xlapp.application.workbooks.open(doc)
xlsub=xlapp.application.activeworkbook.worksheets[1]
delete from product;
commit;
for i= 2 to 4
n=trim(xlsub.cells[i,1].value)
name= trim(xlsub.cells[i,2].value)
p=trim(xlsub.cells[i,3].value)

n=string(n)
name=string(name)
p=string(p)

insert into product values(:n,:name,:p);
commit using sqlca;

end for 
w_message.st_1.text="数据加载完毕"
这是我的代码  高手帮帮忙啊
[解决办法]
今天可是周日啊!

转换出错了,
跟踪下,看看什么数据了!
[解决办法]
你不会跟踪吗!
看是哪一步出错的,再看下是什么数据!
要找到错误原因啊!