[VB.NET]救助:将vb代码转换成vb.net????

前端之家收集整理的这篇文章主要介绍了[VB.NET]救助:将vb代码转换成vb.net????前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
救助:将vb代码转换成vb.net???? 可以将以下vb代码转换成vb.net吗??? dim xlbook as excel.workbook dim xlsheet as excel.worksheet dim cs as connection dim rstu as recordset private sub form_load() set cs=new connection cs.open dsn=stud;uid=sa;pwd=; end sub private sub cmddbtoexcel_click() dim i,h as integer set rstu=new recordset rstu.open select * from student,cs,adopenkeyset,adlockoptimistic set xlapp=new excel.application set xlapp=createobject( excel application ) xlapp.visible=true set xlbook=xlapp.workbooks.add set xlsheet=xlbook.worksheets(1) for i=1 to rstu.fields.count xlsheet.cells(1,i)=rstu(i-1).name next h=2 do while rstu.EOF=False for i=1 to rstu.fields.count xlsheet.cells(h,i)=rstu(i-1) next rstu.movenext h=h+1 loop xlbook.saveas(app.path& /ss.xls ) end sub 非常感谢..... __________________________________________________________________________ lz不如把这段代码要实现的功能说明一下,然后给这段代码适当地加些注释。 __________________________________________________________________________ 看意思好像是把sql Server中的数据存到Excel文件中是么?我谢谢看。 __________________________________________________________________________ 升级向导.. __________________________________________________________________________ 我靠好象也是把sql Server中的数据存到Excel文件中 加一下注释 __________________________________________________________________________

猜你在找的VB相关文章