Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 15-06-2019
nincillo nincillo is offline
Miembro
 
Registrado: may 2017
Posts: 190
Poder: 10
nincillo Va por buen camino
Cita:
Empezado por Casimiro Notevi Ver Mensaje
Mejor que pongas tu código.
He ido comentando partes del código del ejemplo y he conseguido "aislar" las partes que generan el problema. Con ellas comentadas, el fichero se genera correctamente.

A ver si así se os ocurre algo a alguno.

Un saludo
Código Delphi [-]
Procedure Tfrm_MainWindow.btn_StartClick( Sender: TObject );
Var
     I: Integer;
Begin
     With mxNativeExcel1 Do
     Begin
          NewFile;

          FileName := ChangeFileExt( ParamStr( 0 ), '' );
          AddFont( Label2.Font );
          AddFont( Label1.Font );

(* ------> Cualquiera de estas líneas provoca que el fichero resultante no sea reconocido por el excel
          SetHeader( 'Test Header' );
          SetFooter( '&N &P' );

          WriteLabel( 'This File was Create By Max''s Native Excel Component!' );
          ActiveFont := 1;
          WriteLabel( 2, 1, 'Please note that, this component is in Beta Test Phase' );
<--------- *)

          Row := 4;
          Column := 1;
          ActiveFont := 0;

          WriteNumber( 2147400000 );

          For I := 0 To 100 Do WriteInteger( I );

          Row := 7;
          Column := 1;
          For I := 0 To 100 Do
          Begin
               If I Mod 2 = 0 Then ActiveFont := 0 Else ActiveFont := 1;
               Shading := ActiveFont = 1;
               WriteInteger( Row + I, I * 2, I );
          End;

          Shading := FALSE;

          SetColumnWidth( 1, 53 );
          SetColumnWidth( 3, 10, 10 );

          Borders := [ ebTop, ebBottom, ebLeft, ebRight ];
          WriteBoolean( 6, 1, TRUE );
          WriteBoolErr( 7, 1, beNA );

          SetLeftMargin( 0.30 ); // ** This value has to be in inches **
          SetBottomMargin( 0.30 ); // ** This value has to be in inches **
          SetTopMargin( 0.30 ); // ** This value has to be in inches **
          SetRightMargin( 0.30 ); // ** This value has to be in inches **

          ProtectSheet( TRUE );

          CloseFile;

          SaveToFile;
     End;
End;

Última edición por Casimiro Noteví fecha: 15-06-2019 a las 13:04:36.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Problema para generar vector a partir de maskedit y combobox MoeHoward OOP 5 03-11-2015 00:31:48
Problema para generar fechas automaticamente Vales08 Varios 6 17-10-2011 18:30:25
Problema al utilizar variables para operación de suma en Rave nikita Impresión 3 06-11-2007 13:58:13
Problema para utilizar Sony Vaio Arcioneo Varios 3 14-08-2007 17:56:10
Instalar componentes mxExport. fjardelphi OOP 1 14-12-2005 13:44:02


La franja horaria es GMT +2. Ahora son las 14:32:46.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi