Dim isExcelOpen As Boolean = False
Dim xlapp
Dim wbxl
Dim wsxl
Dim intRow As Integer 'counter
Dim oRow As DataRow
On Error Resume Next
xlapp = GetObject(, "Excel.Application")
If xlapp Is Nothing Then
xlapp = CreateObject("Excel.Application")
If xlapp Is Nothing Then
MsgBox("Necesita Microsoft Excel para utilizar esta opción.", vbCritical, "Auditoría de Retiros")
Exit Sub
End If
Else
xlapp = CreateObject("Excel.Application")
End If
wbxl = xlapp.Workbooks.Add
wsxl = xlapp.Sheets(1)