% Name of the excel file
filename = 'directory\output.xls';
% Name of the sheet you wan to delete
sname='corner';
% Open Excel as a COM Automation server
Excel = actxserver('Excel.Application');
% Open Excel workbook
Workbook = Excel.Workbooks.Open(filename);
%get a h
这是我的连接字符串
Dim connString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=O:\[...].xlsx;Extended Properties='Excel 12.0 Xml;HDR=YES;'"
我直接从excel中直接提取工作表名称:
Dim xlWorkSheet As Excel.Worksheet
Dim xlApp As New Excel.Application
xlApp.Workbooks.Open("O:[...].