Dim excel As ObjectSet excel = CreateObject("excel.application") "設定 excel API"--------------這上面可不看 照抄excel.workbooks.Open ("C:\book.xls") "P.s請先自己創立 "excel 開啟excel.Visible = True "excel 顯示 or 隱藏 (True of Falseexcel.cells(1,2)="測試"text1 = excel.cells(1,2) "text1 讀取excel.ActiveWorkbook.Save "excel 存檔excel.quit "excel 關閉
Dim excel As ObjectSet excel = CreateObject("excel.application") "設定 excel API"--------------這上面可不看 照抄excel.workbooks.Open ("C:\book.xls") "P.s請先自己創立 "excel 開啟excel.Visible = True "excel 顯示 or 隱藏 (True of Falseexcel.cells(1,2)="測試"text1 = excel.cells(1,2) "text1 讀取excel.ActiveWorkbook.Save "excel 存檔excel.quit "excel 關閉