Visual Basic - acceder a datos en exel con Vb 6.0

Life is soft - evento anual de software empresarial
 
Vista:

acceder a datos en exel con Vb 6.0

Publicado por manolo (4 intervenciones) el 17/05/2004 15:41:44
Hola, ¿me podrian decir como abrir los archivos de excel con VB 6.0?. Yo lo he intentado y me dice "Couldn´t find installable ISAM"

Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:acceder a datos en exel con Vb 6.0

Publicado por miguel (1042 intervenciones) el 18/05/2004 01:16:34
antes que nada debes de activar la siguiente referencia:
Microsoft Excel 9.0 Objetc Library.
'-*-*-*-*-*-*-*
Dim xlApp As Excel.Application
Dim mySheet As Excel.Worksheet
vlRuta = App.Path & "\FacturaRes.xls" 'Buscas tu archivo
xlApp.Workbooks.Open vlRuta 'aqui lo abres
Set mySheet = xlApp.ActiveSheet 'obtienes la hoja de excel

mySheet.Cells(2, 13).Value = "lo que quieras hacer despues"
xlApp.ActiveWorkbook.SaveAs App.Path & "\Factura.xls" 'lo grabas
'Liberar memoria
xlApp.Quit
Set xlApp = Nothing
S A L U D O S.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:acceder a datos en exel con Vb 6.0

Publicado por miguel (1042 intervenciones) el 18/05/2004 01:17:51
antes que nada debes de activar la siguiente referencia:
Microsoft Excel 9.0 Objetc Library.
'-*-*-*-*-*-*-*
Dim xlApp As Excel.Application
Dim mySheet As Excel.Worksheet
vlRuta = App.Path & "\FacturaRes.xls" 'Buscas tu archivo
Set xlApp = CreateObject("Excel.Application") 'CREAS EL OBJETO
xlApp.Workbooks.Open vlRuta 'aqui lo abres
Set mySheet = xlApp.ActiveSheet 'obtienes la hoja de excel

mySheet.Cells(2, 13).Value = "lo que quieras hacer despues"
xlApp.ActiveWorkbook.SaveAs App.Path & "\Factura.xls" 'lo grabas
'Liberar memoria
xlApp.Quit
Set xlApp = Nothing
S A L U D O S.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar