>Thanks alot. I am a really dumby. You have been a tremendous help!
>My goal is to print out several foxpro tables to a neat looking format through excel via ole automation. In a VFP5 report, I am unable to print more than one table (not linked) in each report. That is the reason for my endeavour do achieve it with excel. Do you know of a way I could print more than one table in a nice format with table borders and table gridlines and blank space between tables on a single report?
>Your help is greatly appreciated!
>Thanks
Create an array of the VFP table names to be exported and try something like this:
lnRow = whatever row you want to start
howmanytables = ALEN(TableArray)
FOR i = 1 TO howmanytables
SELECT 0
USE TableArray(i)
GO TOP
* Populate the worksheet with the VFP data
SCAN
.Cells(lnRow,1).Value = TableArray(i).FirstFieldName
.Cells(lnRow,2).Value = TableArray(i).SecondFieldName
.Cells(lnRow,3).Value = TableArray(i).ThirdFieldName
lnRow = lnRow + 1
ENDSCAN
* Skip a line between VFP tables
lnRow = lnRow + 1
ENDFOR
Hope this helps
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only