第1个回答 2009-12-02
通过Vb获取数据,然后循环输出就可以了
对excel操作如下
Dim xlapp As Object
Dim xlBook As Object
Dim xlSheet As Object
Set xlapp = CreateObject("Excel.Application")
Set xlBook = xlapp.Workbooks.Open(App.Path & "\文件.xls")‘打开一个文件
Set xlSheet = xlBook.Worksheets(1)
With xlSheet
.Range(.Cells(2, 1), .Cells(2, 40)).Copy
xlapp.Visible = False
xlapp.DisplayAlerts = False
for i=1 to ...
.Cells(i, 1) = ....
.Cells(i, 2) = ....
.Cells(i, 3) = ....
.Cells(i, 4) = ....
next
end with
Me.CDlTool.Filter=....你要保存的位置
Me.CDlTool.ShowSave本回答被网友采纳