Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to put data in Ms-Excel template ?
Message
From
24/10/2001 16:15:06
 
 
To
24/10/2001 15:42:56
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00572860
Message ID:
00572886
Views:
35
Marc,

You could try something like this:
SELECT SomeFields FROM WhatEver INTO CURSOR ExcelData

*-- copy data to clipboard
_vfp.DataToClip(ALIAS(),RECCOUNT(), 3)

LOCAL oXls
oXls = CREATEOBJECT("Excel.Application")
oXls.Application.DisplayAlerts = .f.

loWorkBook = oXls.application.Workbooks.open(< YourTemplate >)

*-- select destination cell
oXls.ActiveSheet.range("C3").select
oXls.ActiveSheet.paste

loWorkBook.SaveAs(< NewExcelFile >)

oXls.application.quit()
HTH
>Using code in VFP, I want to place data in a specific range (row and column)
>in a Ms-Excel pre-formatted file (template) and save it as a new name.
>Someone knows how to do that in VFP?
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform