"Imports Microsoft.Office.Interop" bileşenini ekle
Aşağıdaki örnek textbox verilerini excele aktarma ile ilgili bir örnek
Kod:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim xls As New Excel.Application
Dim w As Excel.Workbook = xls.Workbooks.Open("C:\dosya ismin.xls")
'Gorunur Yap (istege bagli)
xls.Visible = True
'Excel' e veri aktar
w.Sheets("Sayfa1").range("C6") = TextBox1.Text
'Kaydet
'w.Save()
'Kapat
'w.Close()
'xls.Quit()
End Sub