HARBOUR 3.2 Y EXCEL 2013(SOLUCIONADO)
Posted: Mon Jun 02, 2014 2:44 pm
Estimado
He estado teniendo problemas con EXcel y harbour
el problema esta en que la variable codexcel retorna un ARREGLO
y si coloco oHoja:Cells(i,1):Value returna un character
estare haciendo algo mal al invocar el Excel..
He estado teniendo problemas con EXcel y harbour
- Code: Select all Expand view
- cArch := cGetFile32("Archivos Excel | *.XLS* |" , "Importar desde un archivo",1,,,.T. )
if empty(cArch)
return
endif
if ( oExcel := CREATEOBJECT( "Excel.Application" ) ) = NIL
MsgInfo( "No se pudo comunicar con EXCEL", "Usuario" )
return
endif
oExcel:WorkBooks:Open(cArch )
oHoja := oExcel:ActiveSheet
nRow := oHoja:UsedRange:Rows:Count()
for i := 2 to nRow
if valtype(oHoja:Cells(i,1):Value) <> "U"
codExcel := oHoja:Cells(i,1):Value
IF VALTYPE( CODEXCEL ) <> "C"
ALERT( CODEXCEL )
ALERT( oHoja:Cells(i,1):Value )
ENDIF
...
...
el problema esta en que la variable codexcel retorna un ARREGLO
y si coloco oHoja:Cells(i,1):Value returna un character
estare haciendo algo mal al invocar el Excel..