Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 29-02-2012
Paulao Paulao is offline
Miembro
 
Registrado: sep 2003
Ubicación: Rua D 31 Casa 1 - Inhoaíba - Rio de Janeiro - RJ - Brasil
Posts: 637
Poder: 21
Paulao Va por buen camino
Hizo estas alteraciones:
Código Delphi [-]
function TForm1.TextFoundInFile(path: string; const FileMask:string; const tipo, tabela: string): TStrings;
var
  SR: TSearchRec;
  txt: TextFile;
  Row: string;
  Found: Boolean;
  i: Integer;
  NroExt: TStrings;
begin
  NroExt:= TStringList.Create;
  try
    NroExt.Delimiter:= ';';
    NroExt.DelimitedText:= FileMask;
    path := IncludeTrailingPathDelimiter(path);
    Result := TStringList.Create;
    for i:= 0 to NroExt.Count - 1 do
    begin
      if FindFirst(path + NroExt[i], faAnyFile - faDirectory, SR) = 0 then
        repeat
          AssignFile(txt,path + SR.Name);
          Reset(txt);
          Found:= False;
          while not Eof(txt) and not Found do
          begin
            Readln(txt, Row);
            if Pos(tabela, Row) > 0 then
            begin
              Result.Add(tipo + ';' + tabela + ';' + SR.Name);
              Found:= True
            end
          end;
          CloseFile(txt);
        until FindNext(SR) <> 0
    end
  finally
    NroExt.Free;
  end
end;
El problema es quando me voy a exportar para excel. No estas funcionando. Abajo la forma como yo hago:
Código Delphi [-]
procedure TForm1.VarrerClick(Sender: TObject);
begin
  ClientDataSet1.Open;
  pth := IncludeTrailingPathDelimiter(edtDir.Directory);
  while not ClientDataSet1.Eof do
  begin
    TextFoundInFile(pth,'*.pas;*.dfm',ClientDataSet1.FieldByName('xtype').AsString,ClientDataSet1.FieldB  yName('name').AsString).SaveToFile('D:\Teste\LISTA.xls');
       ClientDataSet1.Next;
  end;

end;
Responder Con Cita
Respuesta



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
Cómo hacer para retornar valores de una Unit a otra karo Varios 6 14-03-2009 20:57:28
Ayuda para hacer una busqueda radije MySQL 0 30-04-2007 10:19:22
como puedo hacer para cambiar un archivo de excel con versión 2.1 a versión 8.0 RONPABLO Servers 4 23-01-2006 06:02:38
como puedo hacer para enviar un quick report por email?? merlin Internet 1 14-12-2003 20:24:17
como puedo hacer para enviar un quick report por email?? merlin Impresión 4 05-12-2003 18:06:58


La franja horaria es GMT +2. Ahora son las 22:29:41.


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