使用vbs调用excel中的宏
使用vbs打开excel文件,并且传递参数调用excel中的macro,自动化完成excel文件的制作。
Set oExcel = createobject("Excel.Application");
oExcel.Visible = true
set oWorkbooks = oExcel.Workbooks.Open(path+filename);
' 调用excel中的auto_make宏,传递指定文件名参数
oExcel.Run "auto_make",path+csvfilename
oWorkbooks.Save
oWorkbooks.Close
oExcel.Quit
Set oWorkbooks = nothing
Set oExcel = nothing