Create an Excel file using vbscripts

前端 未结 5 1385
清歌不尽
清歌不尽 2020-12-29 12:36

How do I create an excel file using VBScript? I searched the net but it just mentions opening an existing file.

This is the extraction from the Internet

5条回答
  •  独厮守ぢ
    2020-12-29 13:33

    'Create Excel
    
    Set objExcel = Wscript.CreateObject("Excel.Application")
    
    objExcel.visible = True
    
    Set objWb = objExcel.Workbooks.Add
    
    objWb.Saveas("D:\Example.xlsx")
    
    objExcel.Quit
    

提交回复
热议问题