PB,excel读入datawindow报错
代码:stringstr_savename,named,s_grxh,ls_cname;intexcelok,li_net;longli_count;oleobjecte...
代码:
string str_savename,named,s_grxh,ls_cname;
int excelok,li_net;
long li_count;
oleobject excelserver;
excelserver=create oleobject;
excelok=excelserver.connecttonewobject("excel.application");
if excelok<>0 then
messagebox("信息提示","连接EXCEL失败,请检查计算机中EXCEL是否工作正常");
return ;
end if
excelserver.visible=false
excelserver.Workbooks.open( "d:\数据.xls",0,0)
excelserver.Application.Sheets( "sheet1 ").Select
【报错行】ls_cname = string(excelserver.application.workbooks(1).worksheets(1).cells(7,7).value)
excelserver.activeworkbook.close(false)
excelserver.application.quit
excelserver.disconnectobject()
DESTROY excelserver
诚信求教,感激! 展开
string str_savename,named,s_grxh,ls_cname;
int excelok,li_net;
long li_count;
oleobject excelserver;
excelserver=create oleobject;
excelok=excelserver.connecttonewobject("excel.application");
if excelok<>0 then
messagebox("信息提示","连接EXCEL失败,请检查计算机中EXCEL是否工作正常");
return ;
end if
excelserver.visible=false
excelserver.Workbooks.open( "d:\数据.xls",0,0)
excelserver.Application.Sheets( "sheet1 ").Select
【报错行】ls_cname = string(excelserver.application.workbooks(1).worksheets(1).cells(7,7).value)
excelserver.activeworkbook.close(false)
excelserver.application.quit
excelserver.disconnectobject()
DESTROY excelserver
诚信求教,感激! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询