TA的每日心情 | 开心 2024-1-5 23:34 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
help中关于excel的两段代码 运行都不成功,是否缺少了关键步骤?
1.DataTable.Import ("C:\flights.xls")
2.Dim ExcelSheet
Set ExcelSheet = CreateObject("Excel.Sheet")
' Make Excel visible through the Application object.
ExcelSheet.Application.Visible = True
' Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1"
' Save the sheet.
ExcelSheet.SaveAs "C:\DOCS\TEST.XLS"
' Close Excel with the Quit method on the Application object.
ExcelSheet.Application.Quit
' Release the object variable.
Set ExcelSheet = Nothing |
|