27-11-19, 10:42 AM
PHP كود :
'أضف مكتبة Microsoft.Office.Interop الى مكتبات البرنامج ثم اعمل لها امبورت'
Imports Microsoft.Office.Interop
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim xl As New Excel.Application
Dim xlw As Excel.Workbook
xlw = xl.Workbooks.Open(My.Application.Info.DirectoryPath & "\Test.xls")
xlw.Sheets("sheet1").select()
TextBox1.Text = xlw.Application.Cells(1, 1).value
TextBox2.Text = xlw.Application.Cells(1, 2).value
TextBox3.Text = xlw.Application.Cells(1, 3).value
xlw.Close()
xlw = Nothing
xl = Nothing
End Sub
End Class
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
