problemas al recorrer una planilla excel
Publicado por jaime (56 intervenciones) el 28/11/2005 16:19:58
Tengo una Planilla Excel con 64.000 Filas , las cuales tengo que recorrer y grabar el Oracle, Donde esta el problema cuando llego a la fila 4.000 o un poco mas o menos y el PC se cuelga.mando Codigo, por si alguien puede ayudarme Gracias....
Public Graba As ADODB.Recordset
Private Sub Command1_Click()
Set Graba = New ADODB.Recordset
Dim xlApp As Excel.Application
Dim mySheet As Excel.Worksheet
Dim I As Integer
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open "c:\archivo.xls"
xlApp.Visible = True
Set mySheet = xlApp.Worksheets(1) 'Hoja 1
I = 2
Do While Cells(I, 1) <> ""
v_clasificacion = "'" & Cells(I, 2) & "'"
v_seleccion = "'" & Cells(I, 3) & "'"
v_codigo = "'" & Cells(I, 4) & "'"
Graba() ' graba sin problemas
I = I + 1
DoEvents
Loop
Set xlApp = Nothing
xlApp.Quit
End Sub
Public Graba As ADODB.Recordset
Private Sub Command1_Click()
Set Graba = New ADODB.Recordset
Dim xlApp As Excel.Application
Dim mySheet As Excel.Worksheet
Dim I As Integer
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open "c:\archivo.xls"
xlApp.Visible = True
Set mySheet = xlApp.Worksheets(1) 'Hoja 1
I = 2
Do While Cells(I, 1) <> ""
v_clasificacion = "'" & Cells(I, 2) & "'"
v_seleccion = "'" & Cells(I, 3) & "'"
v_codigo = "'" & Cells(I, 4) & "'"
Graba() ' graba sin problemas
I = I + 1
DoEvents
Loop
Set xlApp = Nothing
xlApp.Quit
End Sub
Valora esta pregunta


0