Title: E-mail IPQ Tecnologia
Desculpe, também é 1.5, é que mandei um nível de classe superior, veja os métodos internos que usam os objetos do Activex:

!!CB!! 279
Function: SetRange
    Description:
    Returns
        Boolean:
    Parameters
        String: psCelula1
        String: psCelula2
    Static Variables
    Local variables
        : vCelula1
            Class: Variant
        : vCelula2
            Class: Variant
    Actions
        If bArquivoAberto
            Call vCelula1.SetString( psCelula1 )
            Call vCelula2.SetString( psCelula2 )
            If oWorksheet.PropGetRange( vCelula1, vCelula2, oRange )
                Set bRangeInformado = TRUE
        Return bRangeInformado

!!CB!! 279
Function: SetFormatCell
    Description:
    Returns
    Parameters
        Number: p_TipoFormato
    Static Variables
    Local variables
        : v_Format
            Class: Variant
    Actions
        If p_TipoFormato = EXC_Text
            Call v_Format.SetString( "@" )
            Call oRange.PropSetNumberFormat( v_Format )
        Else If p_TipoFormato = EXC_General
            Call v_Format.SetString( "General" )
            Call oRange.PropSetNumberFormat( v_Format )
        Else If p_TipoFormato = EXC_Number
            Call v_Format.SetString( "0.00000" )
            Call oRange.PropSetNumberFormat( v_Format )
        Else If p_TipoFormato = EXC_Date
            Call v_Format.SetString( "dd/mm/yy" )
            Call oRange.PropSetNumberFormat( v_Format )



On 19/05/2010 16:39, Eduardo Borges wrote:
Eu utilizo a versão 1.5.1, qual a biblioteca que eu devo utilizar?
 
Atc,
 
Eduardo
----- Original Message -----
From: Erasmo
Sent: Wednesday, May 19, 2010 4:14 PM
Subject: Re: [sqlwin] Exportação para excel

Você formatou a célula antes?
Eu sempre formato a célula para Number antes de setar um valor numérico:

!!CB!! 134
Function: gf_ExcelSetCellFormat !__Exported
    Description:
    Returns
    Parameters
        String: p_s_Cell
        Number: p_n_Format
    Static Variables
    Local variables
    Actions
        Call gv_c_Excel.SetRange( p_s_Cell, p_s_Cell)
        Call gv_c_Excel.SetFormatCell( p_n_Format )

p_n_Format pode ser:

!!CB!! 208
Number: EXC_Number = 0
Number: EXC_Date = 1
Number: EXC_General = 2
Number: EXC_Text = 3

Sds,
Erasmo

--
Erasmo Bispo de Oliveira Junior
Gerente de Pesquisa e Desenvolvimento
Softway S.A. - Soluções em Software para Comércio Exterior
Pabx: +55 (19) 3344.9200
Direto:+55 (19) 3344.9361
Fax: +55 (19) 3344.9240
e-mail: erasmo.olive...@sfw.com.br
web: http://www.softcomex.com.br

Antes de imprimir esta mensagem, pense em sua responsabilidade e compromisso com o meio ambiente!


On 19/05/2010 14:50, Eduardo Borges wrote:
 

Pessoal,

 

 Boa tarde,

 

 Estou com o seguinte problema:

 

 Estou fazendo um select e populando uma tabela com o campo numérico = 10.0000, que é o número dez, quando exporto para o excel, vai 100.000 (cem mil), ja tentei popular numa coluna string e também não funcionou.

 

 Alguma sugestão?

 

grato,

Eduardo Borges
Analista de Sistemas
edua...@ipqtecnologia.com.br
www.ipqtecnologia.com.br
+55 (71) 3340-3200






--
Erasmo Bispo de Oliveira Junior
Gerente de Pesquisa e Desenvolvimento
Softway S.A. - Soluções em Software para Comércio Exterior
Pabx: +55 (19) 3344.9200
Direto:+55 (19) 3344.9361
Fax: +55 (19) 3344.9240
e-mail: erasmo.olive...@sfw.com.br
web: http://www.softcomex.com.br

Antes de imprimir esta mensagem, pense em sua responsabilidade e compromisso com o meio ambiente!

Responder a