Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy to command

Status
Not open for further replies.

fluppe689

Programmer
Jul 11, 2008
75
BE
Dear Experts,

How can I export a cursor file to the version of excel(excel97-2003)

Now i do
copy to aaa.xls type xl5

copy to aaa.xls type xl8 doesn't work
I use the copy statement because i need to attach it to an email

wfg

filip merlier
 
Mike,

Thank you for the answer but :

I know that.
But the user who opens the file and try to save the excel file always gets the question if he wants to save that under the latest (in this case office 2003) version.
Can i avoid this ???


wfg,

Filip Merlier

 
Filip,

As far as I know you can only avoid that by creating the Excel spreadsheet using automation of Excel.

Stewart
 
Also be aware that VFP cannot natively IMPORT FROM or APPEND FROM Excel 2007. To read in that spreadsheet format you will need to create objects ABODB.Connection and ADODB.RecordSet to loop through the file. The ConnectionString property will have to be set to "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+XLSXfile+";Extended Properties='Excel 12.0;HDR=No;IMEX=1'
 
If you have office 2003, you could simply use the first output xls file, programmatically load it with excel and resave it converted to the 2003 format before mailing it.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top