30-09-19, 12:06 AM
(آخر تعديل لهذه المشاركة : 30-09-19, 12:07 AM {2} بواسطة asemshahen5.)
PHP كود :
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Dim xlWorkSheet As Microsoft.Office.Interop.Excel.Worksheet
Dim xlApp As New Microsoft.Office.Interop.Excel.Application
Dim opd As New OpenFileDialog
opd.Filter = "ملفات الاكسيل |*.xlsx"
If opd.ShowDialog = Windows.Forms.DialogResult.OK Then
xlApp.Workbooks.Open(opd.FileName, 0, True)
End If
'' For the first sheet in an excel spreadsheet
xlWorkSheet = CType(xlApp.Sheets(1), _
Microsoft.Office.Interop.Excel.Worksheet)
''Dim strSheetName As New List(Of String)
For Each xlWorkSheet In xlApp.Sheets
''strSheetName.Add(xlWorkSheet.Name)
ListBox1.Items.Add(xlWorkSheet.Name)
Next
End Sub
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
