In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Hojas de calculo

Foro público de Xailer en español
Responder
Moises Leon
Mensajes: 103
Registrado: Mié Dic 15, 2010 4:45 pm

Hojas de calculo

Mensaje por Moises Leon »

Hola a todos
Estoy usando una clase que manipula hojas de calculo de Excel desde el
codigo, con xHarbour (Xailer 2.7.5 con xHarbour) todo funciona muy bien pero
cuando compilo ya con Harbour (Xailer 2.7.5 con Harbour), todas estas lineas
ya no funcionan:
::oSheet:Range( cRange ):Set("WrapText",.T.)
::oSheet:Columns( nCol ):Set("ColumnWidth", Alltrim(Str(nWidth)) )
::oSheet:Cells( nRow, nCol ):Set("NumberFormat",cFormat)
::oSheet:Cells( nRow,
nCol ):Set("HorizontalAlignment",Alltrim(Str(nAlign)))
::oSheet:Cells( nRow, nCol ):Set("Orientation",nOrien)
::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText)
::oSheet:Cells( nRow, nCol ):Comment:Text := cText
::oSheet:Cells( nRow, nCol ):Comment:Visible := lVisible
Alguno de ustedes tendra una idea de porque sea asi?
Agradecere mucho su ayuda. Saludos y muchas gracias
Moises Leon
Cassiano de Oliveira
Mensajes: 475
Registrado: Mar Jul 24, 2012 10:21 pm

Hojas de calculo

Mensaje por Cassiano de Oliveira »

Moises vc já verificou a possibilidade de ser o seguinte:
Em Harbour use WIN_OLECreateObject()
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := WIN_OLECreateObject( "Excel.Application" )
CATCH
MsgAlert( "Erro! O Excel não esta Ativado ou Não instalada nesse
Computador")
RETURN NIL
END
END
Em xHarbour use CreateObject()
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH
MsgAlert( "Erro! O Excel não esta Ativado ou Não instalada nesse
Computador")
RETURN NIL
END
END
[]´s
"Moises Leon Rosas" wrote in message news:515c6e3e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
Hola a todos
Estoy usando una clase que manipula hojas de calculo de Excel desde el
codigo, con xHarbour (Xailer 2.7.5 con xHarbour) todo funciona muy bien pero
cuando compilo ya con Harbour (Xailer 2.7.5 con Harbour), todas estas lineas
ya no funcionan:
::oSheet:Range( cRange ):Set("WrapText",.T.)
::oSheet:Columns( nCol ):Set("ColumnWidth", Alltrim(Str(nWidth)) )
::oSheet:Cells( nRow, nCol ):Set("NumberFormat",cFormat)
::oSheet:Cells( nRow,
nCol ):Set("HorizontalAlignment",Alltrim(Str(nAlign)))
::oSheet:Cells( nRow, nCol ):Set("Orientation",nOrien)
::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText)
::oSheet:Cells( nRow, nCol ):Comment:Text := cText
::oSheet:Cells( nRow, nCol ):Comment:Visible := lVisible
Alguno de ustedes tendra una idea de porque sea asi?
Agradecere mucho su ayuda. Saludos y muchas gracias
Moises Leon
Moises Leon
Mensajes: 103
Registrado: Mié Dic 15, 2010 4:45 pm

Hojas de calculo

Mensaje por Moises Leon »

Esto es lo que use pero sigue haciendo lo mismo, gracias.
#IFDEF __XHARBOUR__
TRY
::oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
::oExcel := CreateObject( "Excel.Application" )
CATCH
Alert( "No está Excel Instalado en está Pc." )
::lExcel := .F.
END
END
#ELSE
TRY
::oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
::oExcel := WIN_OLECreateObject( "Excel.Application" )
CATCH
MsgAlert( "Erro! O Excel não esta Ativado ou Não instalada nesse
Computador")
RETURN NIL
END
END
#ENDIF
"Cassiano de Oliveira" <calunaty@calunaty.com.br> escribió en el mensaje de
noticias news:[email=515c784c@svctag-j7w3v3j....]515c784c@svctag-j7w3v3j....[/email]
> Moises vc já verificou a possibilidade de ser o seguinte:
>
>
> Em Harbour use WIN_OLECreateObject()
>
> TRY
> oExcel := GetActiveObject( "Excel.Application" )
> CATCH
> TRY
> oExcel := WIN_OLECreateObject( "Excel.Application" )
> CATCH
> MsgAlert( "Erro! O Excel não esta Ativado ou Não instalada nesse
> Computador")
> RETURN NIL
> END
> END
>
>
>
> Em xHarbour use CreateObject()
>
> TRY
> oExcel := GetActiveObject( "Excel.Application" )
> CATCH
> TRY
> oExcel := CreateObject( "Excel.Application" )
> CATCH
> MsgAlert( "Erro! O Excel não esta Ativado ou Não instalada nesse
> Computador")
> RETURN NIL
> END
> END
>
>
> []´s
>
> "Moises Leon Rosas" wrote in message news:515c6e3e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>
> Hola a todos
>
> Estoy usando una clase que manipula hojas de calculo de Excel desde el
> codigo, con xHarbour (Xailer 2.7.5 con xHarbour) todo funciona muy bien
> pero
> cuando compilo ya con Harbour (Xailer 2.7.5 con Harbour), todas estas
> lineas
> ya no funcionan:
>
> ::oSheet:Range( cRange ):Set("WrapText",.T.)
> ::oSheet:Columns( nCol ):Set("ColumnWidth", Alltrim(Str(nWidth)) )
> ::oSheet:Cells( nRow, nCol ):Set("NumberFormat",cFormat)
> ::oSheet:Cells( nRow,
> nCol ):Set("HorizontalAlignment",Alltrim(Str(nAlign)))
> ::oSheet:Cells( nRow, nCol ):Set("Orientation",nOrien)
> ::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText)
> ::oSheet:Cells( nRow, nCol ):Comment:Text := cText
> ::oSheet:Cells( nRow, nCol ):Comment:Visible := lVisible
>
> Alguno de ustedes tendra una idea de porque sea asi?
>
> Agradecere mucho su ayuda. Saludos y muchas gracias
>
> Moises Leon
Moises Leon
Mensajes: 103
Registrado: Mié Dic 15, 2010 4:45 pm

Hojas de calculo

Mensaje por Moises Leon »

Por si a alguien le sirve, las lineas ya funcionando xHarbour -> Harbour:
::oSheet:Columns( nCol ):Set("ColumnWidth",
m(Str(nWidth)) ) -> ::oSheet:Cells( nRow, nCol ):ColumnWidth :=
nWidth
::oSheet:Cells( nRow,
Format",cFormat) -> ::oSheet:Cells( nRow,
nCol ):NumberFormat := cFormat
::oSheet:Cells( nRow,
nCol ):Set("HorizontalAlignment",Alltrim(Str(nAlign))) -> ::oSheet:Cells(
nRow, nCol ):HorizontalAlignment := Alltrim(Str(nAlign))
::oSheet:Cells( nRow,
",nOrien) -> ::oSheet:Cells( nRow, nCol ):Orientation
:= nOrien
::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText) ->
::oSheet:Cells( nRow, nCol ):WrapText := .T.
::oSheet:Range( cRange ):Set("WrapText",.T.) ->
::oSheet:Range( cRange ):WrapText := .T.
::oSheet:Cells( nRow, nCol ):Comment:Text := cText ->
::oSheet:Cells( nRow, nCol ):Comment:Text( cText )
"Moises Leon Rosas" <mleon@datacomp.com.mx> escribió en el mensaje de
noticias news:515c6e3e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hola a todos
>
> Estoy usando una clase que manipula hojas de calculo de Excel desde el
> codigo, con xHarbour (Xailer 2.7.5 con xHarbour) todo funciona muy bien
> pero cuando compilo ya con Harbour (Xailer 2.7.5 con Harbour), todas estas
> lineas ya no funcionan:
>
> ::oSheet:Range( cRange ):Set("WrapText",.T.)
> ::oSheet:Columns( nCol ):Set("ColumnWidth", Alltrim(Str(nWidth)) )
> ::oSheet:Cells( nRow, nCol ):Set("NumberFormat",cFormat)
> ::oSheet:Cells( nRow,
> nCol ):Set("HorizontalAlignment",Alltrim(Str(nAlign)))
> ::oSheet:Cells( nRow, nCol ):Set("Orientation",nOrien)
> ::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText)
> ::oSheet:Cells( nRow, nCol ):Comment:Text := cText
> ::oSheet:Cells( nRow, nCol ):Comment:Visible := lVisible
>
> Alguno de ustedes tendra una idea de porque sea asi?
>
> Agradecere mucho su ayuda. Saludos y muchas gracias
>
> Moises Leon
Claudio[1]
Mensajes: 59
Registrado: Vie May 01, 2009 5:40 am

Hojas de calculo

Mensaje por Claudio[1] »

Gracias por compartirlo
Viene como anillo al dedo
Claudio
El 04/04/2013 18:49, Moises Leon Rosas escribió:
> Por si a alguien le sirve, las lineas ya funcionando xHarbour -> Harbour:
>
> ::oSheet:Columns( nCol ):Set("ColumnWidth", m(Str(nWidth)) )
> -> ::oSheet:Cells( nRow, nCol ):ColumnWidth := nWidth
> ::oSheet:Cells( nRow, Format",cFormat) ->
> ::oSheet:Cells( nRow, nCol ):NumberFormat := cFormat
> ::oSheet:Cells( nRow, nCol
> ):Set("HorizontalAlignment",Alltrim(Str(nAlign))) -> ::oSheet:Cells(
> nRow, nCol ):HorizontalAlignment := Alltrim(Str(nAlign))
> ::oSheet:Cells( nRow, ",nOrien) ->
> ::oSheet:Cells( nRow, nCol ):Orientation := nOrien
> ::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText)
> -> ::oSheet:Cells( nRow, nCol ):WrapText := .T.
> ::oSheet:Range( cRange ):Set("WrapText",.T.)
> -> ::oSheet:Range( cRange ):WrapText := .T.
> ::oSheet:Cells( nRow, nCol ):Comment:Text := cText ->
> ::oSheet:Cells( nRow, nCol ):Comment:Text( cText )
>
>
>
>
> "Moises Leon Rosas" <mleon@datacomp.com.mx> escribió en el mensaje de
> noticias news:515c6e3e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hola a todos
>>
>> Estoy usando una clase que manipula hojas de calculo de Excel desde el
>> codigo, con xHarbour (Xailer 2.7.5 con xHarbour) todo funciona muy
>> bien pero cuando compilo ya con Harbour (Xailer 2.7.5 con Harbour),
>> todas estas lineas ya no funcionan:
>>
>> ::oSheet:Range( cRange ):Set("WrapText",.T.)
>> ::oSheet:Columns( nCol ):Set("ColumnWidth", Alltrim(Str(nWidth)) )
>> ::oSheet:Cells( nRow, nCol ):Set("NumberFormat",cFormat)
>> ::oSheet:Cells( nRow, nCol
>> ):Set("HorizontalAlignment",Alltrim(Str(nAlign)))
>> ::oSheet:Cells( nRow, nCol ):Set("Orientation",nOrien)
>> ::oSheet:Cells( nRow, nCol ):Set("WrapText",lWrapText)
>> ::oSheet:Cells( nRow, nCol ):Comment:Text := cText
>> ::oSheet:Cells( nRow, nCol ):Comment:Visible := lVisible
>>
>> Alguno de ustedes tendra una idea de porque sea asi?
>>
>> Agradecere mucho su ayuda. Saludos y muchas gracias
>>
>> Moises Leon
>
Responder