It isnt possible with direct foxpro commands, like the one you mentioned, but you may be able to by creating a foxpro report and saving(exporting?) it to excel, it might do what your aksing.
The other alternative would be to access Excel via ActiveX and create the excel sheet, populate it and modify the header/footer from there. i.e. myexcel = CreateObject("excel.application".
The best way is to manipulate the excel object model. If you create and object with say
loExcel = CreateObject("excel.application"
then you can control almost anything that is available in Excel through VBA. If you are using VFP 7 with its excellent Intellisense, you could try this out in the command window and once you have what works, you can paste the code in your method or prg.
remeber that is you want to see what is happening, you would have to issue
loExcel.visible=.t.
I don't have a problem creating the object, but I need to open an existing sheet in a directory that have pre-formed headers. Then I need to place the contents of the table into this sheet.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.