This commit is contained in:
@@ -1765,13 +1765,14 @@ Partial Class RegPoliza
|
||||
Try
|
||||
Select Case Tipo
|
||||
Case "EXCEL"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = "Select * FROM [Hoja1$]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
'Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
'Conexion.Open()
|
||||
'Dim cmd = Conexion.CreateCommand()
|
||||
'cmd.CommandType = CommandType.Text
|
||||
'cmd.CommandText = "Select * FROM [Hoja1$]"
|
||||
'Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
'DataAdapter.Fill(dt)
|
||||
dt = Extensiones.ModExtensiones.ReadExcelFile(String.Format("{0}{1}", Ruta, FileName), True)
|
||||
Case Else
|
||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
|
||||
Reference in New Issue
Block a user