跟小D每日学口语
摘要: 首先,我是用SQL语句把数据从ACCESS表中读出,再把数据逐行写入excel表中。第一步:读数据出来set rs=server.CreateObject("adodb.recordset")rs.open "select * from user ",conn,1,1第二步:写入数据到excel文件中if not (rs.eof And rs.bof) then dim ttxt,file,filepath,writefile ttxt="user.csv" '为要写入的文件取个文件名,后缀可以是txt,xls,这里我用csv,这种文件打开也是excel表 Set file = Create 阅读全文
posted @ 2011-01-11 15:44 明仔¥ 阅读(678) 评论(0) 推荐(0) 编辑