select cb_zwhzgo topXLApp = GetObject('F:\temp\sqlinout.xls','excel.sheet')XLApp.application.visible=.F.XLApp.application. Windows("sqlinout.xls").Visible = .T.XLSheet =XLApp.Sheets['Sheet1']XLSheet.Cells(1,1).Value = "Month"XLSheet.Cells(1,2).Value = "ZwCode"XLSheet.Cells(1,3).Value = "Qty"XLSheet.Cells(1,4).Value = "Cost"XLSheet.Cells(1,5).Value = "Money"
i=1select cb_zwhzdo while not eof () XLSheet.Cells(i+1,1).Value=Month XLSheet.Cells(i+1,2).Value=ZwCode XLSheet.Cells(i+1,3).Value=Qty XLSheet.Cells(i+1,4).Value=Cost XLSheet.Cells(i+1,5).Value=Money skip i=i+1enddo XLApp.SaveXlApp.Close
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18