Module Module1
Private suptable As Hashtable
Private subtable As Hashtable
Sub Main(ByVal Args() As String)
implementSubAndSup(Args(0))
End Sub
Private Sub implementSubAndSup(ByVal excelName As String)
If (excelName.Length > 0) Then
Dim excelApp As Microsoft.Office.Interop.Excel.Application
Dim excelBook As Microsoft.Office.Interop.Excel.Workbook
Dim excelsheet As Microsoft.Office.Interop.Excel.Worksheet '定义工作表类
Try
excelBook = New Microsoft.Office.Interop.Excel.Workbook()
Catch ex As Exception
End Try
excelApp = CreateObject("Excel.Application")
excelApp.DisplayAlerts = False
Try
excelBook = excelApp.Workbooks.Open(excelName)
Catch ex As Exception
' System.Console.WriteLine("excelBook......." + ex.Message)
End Try
excelApp.Visible = False
Dim m As Integer
Dim sheetCount As Integer
Try
sheetCount = excelBook.Worksheets.Count
Catch ex As Exception
End Try
If (sheetCount > 0) Then
For m = 1 To sheetCount
Try
excelsheet = New Microsoft.Office.Interop.Excel.Worksheet()
Catch ex As Exception
End Try
Try
excelsheet = excelBook.Worksheets(m)
excelsheet.Select()
Catch ex As Exception
' System.Console.WriteLi