发布于 2009-12-29 15:57:19
1楼
需要保存工作簿文件。
Dim objExcelApp,xlBook,xlSheet
Set objExcelApp = CreateObject("Excel.Application")
Set xlBook = objExcelApp.Workbooks.Open(fname)
Set xlSheet = xlBook.Worksheets("sheet1")
With xlSheet
.cells(3,1)=Year(Date)
.cells(3,3)=...
.cells(3,5)=...
.cells(7,1)=...
End With
xlBook.Save
objExcelApp.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set objExcelApp = Nothing
无论成与败,无论甜与苦,我还是我。