![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Buenas les pediria cierta ayuda
Estoy haciendo un programa muy básico para con conección con Excel y me da un error al salvarlo en procedimiento en concreto es este:
Procedure TForm2.Button1Click(Sender: TObject); {boton de validar la factura} var OleApli,OleWB : Variant; PrecioKwatio , Importe:real; Valor:string; Nombre_archivo :String; i:Integer; begin assignfile(Arch_NFactura,'c:\Facturas\NFactura.txt'); Append(Arch_NFactura); assignfile(Arch_Tarifa,'c:\Facturas\Tarifa.txt'); reset(Arch_Tarifa); Factura.Visible:=False; Importe:=StrtoFloat(NFactura); Importe:=Importe+1; NFactura:=FloattoStr(Importe); writeln (Arch_NFactura,NFactura); writeln (Arch_NFactura,FechaEmision); writeln (Arch_NFactura,mes); writeln (Arch_NFactura,agno); writeln (Arch_NFactura,LecturaActual); writeln (Arch_NFactura,LecturaAnterior); PeriodoFactura:=(mes+'-'+agno); Edit1.Enabled:= False; Edit2.Enabled:= False; Edit3.Enabled:= False; Edit4.Enabled:= False; Edit5.Enabled:= False; OleApli := CreateOleObject('Excel.Application'); OleApli.Visible:=true; OleWB := OleApli.Workbooks.open('c:\Facturas\Modelo Factura numero 000.xls'); OleApli.Cells[19,7]:= NFactura; OleApli.Cells[19,9]:= FechaEmision; OleApli.Cells[42,5]:= PeriodoFactura; OleApli.Cells[37,8]:= LecturaActual; OleApli.Cells[36,8]:= LecturaAnterior; OleApli.Cells[44,4]:= Tarifa; Importe:= OleApli.Cells[52,8]; Valor:= floattoStrf(Importe,ffCurrency,8,2); writeln (Arch_NFactura,Valor); Closefile (Arch_NFactura); {------------------ es aquí donde me da el error al salvarlo ----------------} OleApli.ActiveWorkBooks.saveAs('c:\Facturas numero 0'+NFactura+'.xls'); {-------------------------------------------------------------------------} Edit1.Text:=NFactura; Form2.Visible:=False; Form4:=TForm4.Create(self); Form4.caption:='Factura '+(NFactura); Form4.show; end; {-------------------------------------------------------------------------------} lo cierto es que no doy con el error, si alguien puede ayudar se lo agradecería. Saludos |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
buenas | calcena | Varios | 2 | 29-11-2010 11:42:55 |
buenas maneras... | BlueSteel | Humor | 23 | 13-06-2008 08:11:21 |
Buenas Noticias | faustoffp | Noticias | 0 | 04-09-2006 06:33:06 |
Problemas en el tratamiento de cierta excepción | dec | Varios | 4 | 25-07-2005 21:05:47 |
Imprimir en cierta posición con el Canvas | BlueSteel | Impresión | 4 | 19-01-2005 14:47:33 |
![]() |
|