'Sheet1: The name or index of the sheet in the file that you want to import. Index values begin with 1.
'Action1: The name or index of the sheet in the Data Table that you want to replace with the SheetSource. Index values begin with 1.
DataTable.ImportSheet "C:/JX/WorkSpace/test.xls","Sheet1","Action1"
Dim xl
Set xl = createobject("excel.application")
xl.Visible = true
xl.Workbooks.Open("C:/JX/WorkSpace/test.xls")
Set xl = nothing

本文介绍了一个使用VBA代码实现从指定路径加载Excel文件并进行Sheet页操作的示例,包括打开文件、显示Excel界面及后续的Sheet页导入等步骤。
1万+

被折叠的 条评论
为什么被折叠?



