PHP كود :
Dim MsExcel = CreateObject("Excel.Application")
MsExcel.Workbooks.Open("d:\book1.xlsx")
DGV1.Columns(0).HeaderText = MsExcel.Cells(0 + 1).Value
DGV1.Columns(1).HeaderText = MsExcel.Cells(1 + 1).Value
DGV1.Columns(2).HeaderText = MsExcel.Cells(2 + 1).Value
DGV1.Columns(3).HeaderText = MsExcel.Cells(3 + 1).Value
DGV1.Rows.Clear()
Dim I As Integer = 0
Do
If MsExcel.Cells(I + 2, 1).Value = "" Then Exit Do
DGV1.RowCount = DGV1.RowCount + 1
DGV1.Rows(I).Cells(0).Value = MsExcel.Cells(I + 2, 1).Value
DGV1.Rows(I).Cells(1).Value = MsExcel.Cells(I + 2, 2).Value
DGV1.Rows(I).Cells(2).Value = MsExcel.Cells(I + 2, 3).Value
DGV1.Rows(I).Cells(3).Value = MsExcel.Cells(I + 2, 4).Value
I = I + 1
Loop
MsExcel.Quit()
Updated
