批处理估计不行,vbs可以这样:- Set oExcel = CreateObject("Excel.Application")
- oExcel.Visible = true
- Set oBook = oExcel.WorkBooks.Add
- Set oSheet = oBook.WorkSheets.Add
-
- oExcel.Cells(1, 1) = "型号"
- oExcel.Cells(1, 2) = "数量"
- oExcel.Cells(2, 1) = "统一方便面"
- oExcel.Cells(2, 2) = "200"
- oExcel.Cells(2, 2).AddComment "每箱20包"
复制代码
|