VB创建新EXCLE表格
发布网友
发布时间:2022-04-22 22:15
我来回答
共1个回答
热心网友
时间:2023-10-05 10:56
dim exc as new excel.application
exc.workbooks.add
exc.sheet("sheet1").select
exc.sheet("sheet1").name=text1.text
exc.ActiveWorkbook.SaveAs Filename:=路径 & text1.text & ".xls",FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
exc.quit追问第三句编译错误,
追答三四行改成:
exc.sheets("sheet1").select
exc.sheets("sheet1").name=text1.text