Page 1 of 2

DBF Viewer

Posted: Wed Dec 30, 2009 2:57 am
by MigSoft
Hello everyone,

"dbfview" is an application that is a mixture of code provided by our friends Rathinagiri, Grigory Filatov and an adaptation of sample "contactos" by Roberto Lopez.

I hope it serves as a starting point of a tool for viewing files DBF.

Regards,

Miguel Angel Juárez A.


Compile with IDE :P

Re: DBF Viewer

Posted: Wed Dec 30, 2009 5:08 am
by dhaine_adp
Hi MigSoft,

I downloaded the file, thanks for sharing. I'll test it and hopefully I can get back to you.

Happy New Year too...... and to everyone as well!!!!!!!!!!!!!!!!!!!

Thanks,

Danny

Re: DBF Viewer

Posted: Wed Dec 30, 2009 8:28 am
by Alex Gustow
Hi Miguel! I downloaded your app, runed - it looks and works fine & useful. Really good thing - thanks for sharing!

Danny, I agree with you - HAPPY NEW YEAR to all !!!!!!

Re: DBF Viewer

Posted: Wed Dec 30, 2009 11:22 am
by fchirico
MigSoft wrote:Hello everyone,

"dbfview" is an application that is a mixture of code provided by our friends Rathinagiri, Grigory Filatov and an adaptation of sample "contactos" by Roberto Lopez.

I hope it serves as a starting point of a tool for viewing files DBF.

Regards,

Miguel Angel Juárez A.


Compile with IDE :P
Gracias Miguel!

Feliz año nuevo para todos!!!

Happy new year for all!!

Re: DBF Viewer

Posted: Wed Dec 30, 2009 12:56 pm
by MigSoft
Corrigenda, :D

File "dbview.prg "on export to Excel routine please change a few lines as follows.

Code: Select all

*--------------------------------------------------------*
Procedure SaveToXls( cAlias, cFile )
*--------------------------------------------------------*
   Local oExcel,  oSheet, oBook, aColumns, nCell := 1

   If !Empty( cbase )

        IF ( oExcel := win_oleGetActiveObject("Excel.Application" )) == NIL
           IF ( oExcel := win_oleCreateObject("Excel.Application" ) ) == NIL
              MsgStop( "ERROR! Excel is not available. ["+ Ole2TxtError()+ "]", PROGRAM )
              Return
           ENDIF
        ENDIF

	oExcel:Visible := .F.
	oExcel:WorkBooks:Add()
	oSheet := oExcel:ActiveSheet()  

	Aeval( (cAlias)->( DBstruct(cAlias) ), { |e,i| oSheet:Cells( nCell, i ):Value := e[DBS_NAME] } )
	do while !(cAlias)->( EoF() )
		nCell++
		aColumns := (cAlias)->( Scatter() )
		aEval( aColumns, { |e,i| oSheet:Cells( nCell, i ):Value := e } )
		(cAlias)->( DBskip() )
	enddo

	oBook := oExcel:ActiveWorkBook()
	oBook:Title   := cAlias
	oBook:Subject := cAlias
	oBook:SaveAs(cFile)
	oExcel:Quit()

   Endif

Return
Regards,

MigSoft

Re: DBF Viewer

Posted: Wed Dec 30, 2009 5:55 pm
by sudip
Hello MigSoft,

Thanks a lot for sharing.
Regarding export to excel. You may try with copying and pasting (from clipboard). IMHO, it will be more efficient mainly for larger tables.
With best regards.

Sudip

Re: DBF Viewer

Posted: Wed Dec 30, 2009 6:15 pm
by MigSoft
Hi Sudip,

Very interesting. How so :?: :roll:

Regards,

MigSoft

Re: DBF Viewer

Posted: Wed Dec 30, 2009 6:41 pm
by esgici
Hola Miguel

Congrats and thanks, good and big job :)

Yet another "contender" to DBA ;)

Saludos

--

Esgici

Re: DBF Viewer

Posted: Wed Dec 30, 2009 11:16 pm
by MigSoft
Hello Esgici,

Thanks for your kind words.

DBA is a powerful tool (Congratulations), and has many functions that at this time "DBViewer" does not count.

In the future we can all keep adding new features. :P

Best regards,

MigSoft

Re: DBF Viewer

Posted: Wed Dec 30, 2009 11:45 pm
by Roberto Lopez
MigSoft wrote:Hello everyone,

"dbfview" is an application that is a mixture of code provided by our friends Rathinagiri, Grigory Filatov and an adaptation of sample "contactos" by Roberto Lopez.

I hope it serves as a starting point of a tool for viewing files DBF.

Regards,

Miguel Angel Juárez A.


Compile with IDE :P

Thanks!!!