Página 1 de 1

Hojas de calculo

Publicado: Mié Abr 03, 2013 8:00 pm
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

Hojas de calculo

Publicado: Mié Abr 03, 2013 8:42 pm
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

Hojas de calculo

Publicado: Mié Abr 03, 2013 9:47 pm
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

Hojas de calculo

Publicado: Jue Abr 04, 2013 11:49 pm
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

Hojas de calculo

Publicado: Vie Abr 05, 2013 12:14 am
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
>