Dim ExcelApp As New Microsoft.Office.Interop.Excel.ApplicationClass
Dim WorkBook As Microsoft.Office.Interop.Excel.Workbook
Dim WorkSheet As Microsoft.Office.Interop.Excel.Worksheet

Dim intSheetCount as Integer
Dim strFileName As String = "C:\AAA.xls" '你的檔案所在路徑

WorkBook = ExcelApp.Workbooks.Open(strFileName)

intSheetCount = WorkBook.Worksheets.Count '此處抓到Sheet數量


文章標籤
全站熱搜
創作者介紹
創作者 kylin25 的頭像
kylin25

打混中

kylin25 發表在 痞客邦 留言(1) 人氣(663)