Ver Mensaje Individual
  #3  
Antiguo 05-03-2015
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.282
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Yo he usado con Delphi 7 y automatización estandard (de esto hay muchos ejemplos) un código como este para formatear celdas.
Código Delphi [-]
...
var
  wb, Range: OLEVariant;
begin
   ...
   xls := CreateOLEObject('Excel.Application');
   ...
    // format de la primera columna
    Range := AWorkSheet.Range[AWorkSheet.Cells[1, 1],
                                    AWorkSheet.Cells[RowCount, 1]];
    Range.NumberFormat := '#.##0';

Por ahí he visto documentación que usa algo como esto:

Código Delphi [-]
  ...  
  Range.NumberFormat = "hh:mm:ss"
  ...

Así que es posible que se pueda usar el equivalente para fechas que necesitas aunque no lo e probado).
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita