vfp 中的copy 命令可以把数据导入到excel中
如
select b
copy to c:\a.xls type xl5
如
select b
copy to c:\a.xls type xl5
解决方案 »
- 数据库维护计划出错,问题在哪?
- 我按在SQLSERVER2000时选择的是WINDOWS权限认证模式,但是现在我怎样把它该为WINDOWS和SQLServe混合验证模式?
- 我想查询出表中最后的那一批数据,如何查?
- 求从Access导数据到SQL Server的SQL语句!
- 一个触发器的问题
- my sql与sql sever怎么转化
- 看看我的函数,怎么就是答不到我的效果
- 大虾救命啊
- 经朋友介绍初来乍到,请各位多多关照!(不是问题)
- 三条重复记录如何修改其中两条
- 各位大虾,中午好!菜鸟的问题,恳请指教,有关数据库全文检索和模糊查询的,挺急的
- sybase中是否有类似MS SQL Server动态执行SQL语句(execute)?
select cb_zwhz
go top
XLApp = GetObject('F:\temp\sqlinout.xls','excel.sheet')
XLApp.application.visible=.F.
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=1
select cb_zwhz
do 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+1
enddo
XLApp.Save
XlApp.Close打开execl文件时要取消隐藏才可看到数据,你查查VBA可直接在vfp中操作过来。