Imprimir datos de un DBF a excel y a PDF

171 views
Skip to first unread message

Clip Fox

unread,
Dec 10, 2025, 7:53:56 PM (6 days ago) Dec 10
to Harbour Users
Mis saludos queridos amigos, quiero imprimir información de un DBF a excel e igualmente llevarlos a PDF.

Tendrán algún ejemplo que me pueda ayudar.


Gracias por la ayuda que me puedan dar amigos.

poopall

unread,
Dec 10, 2025, 8:15:28 PM (6 days ago) Dec 10
to Harbour Users
Are you using Windows or Linux or something else

For windows 
Use something like
oExcel := TOleAuto():New( "Excel.Application" )
You can then select sheets, cells ranges etc

For PDF try something simple like 

Cant assist you for other OS

Clip Fox

unread,
Dec 10, 2025, 10:21:24 PM (6 days ago) Dec 10
to harbou...@googlegroups.com
estoy utilizando windows 7 32 bit

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/jOoeIV91CNQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/6cd87b10-01fd-46bd-8e3d-38ba301d187bn%40googlegroups.com.

poopall

unread,
Dec 11, 2025, 2:28:42 AM (6 days ago) Dec 11
to Harbour Users
Use  oExcel := TOleAuto():New( "Excel.Application" )  if you have Excel on the machine preparing the file

There are some libraries out there as well that you can use if excel is not available

Example quick and nasty


Local oExcel, oSheet , i

try
                oExcel = CREATEOBJECT( "Excel.Application" )
        catch oErr
                Alert( "Excel not found on this machine therefore cannot run" )
                return
        end


        oExcel:WorkBooks:Add()
        oSheet = oExcel:ActiveSheet
        for i = 1 to 100
                         oSheet:Cells( i, 01 ):Value = i
                         oSheet:Cells( i, 02 ):Value =  "This a column 2"
// etc 
// etc
        next
        oExcel:Visible = .T.


RELEASE oSheet
RELEASE oExcel

See VBA for Excel for more info

bernardm...@gmail.com

unread,
Dec 11, 2025, 8:00:47 AM (6 days ago) Dec 11
to Harbour Users
Maybe you can tae some idea : http://bernard.mouille.free.fr/mso-hb32/EX_ExportToPdf.txt
Regards,
Bernard.

Clip Fox

unread,
Dec 11, 2025, 8:44:52 PM (5 days ago) Dec 11
to harbou...@googlegroups.com
Dejame ver el codigo gracias amigo...

Reply all
Reply to author
Forward
0 new messages