Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert to excel
Message
 
 
To
01/11/2009 06:02:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01432557
Message ID:
01432561
Views:
60
>hi all,
>
>i need to convert table or cursor to excel sheet to m.a=finance&& sheet name
>
>SELECT  question1 as ÇáÓÄÇá,question,ROUND(countof1,0) as ÖÚíÝ ,ROUND(countof2,0) as ãÞÈæá, ROUND(countof3,0) as ÌíÏ, ROUND(countof4,0) as ÌíÏÌÏÇ,ROUND(countof5,0) as ããÊÇÒ;
> FROM  mucur INTO CURSOR koko nofilter;
>
>COPY TO ("c:\dept\koko as m.a) XLS &&rong statment  
>
>
>thanks

Mohammed,

1. Check COPY TO command syntax in Help.
COPY TO ("c:\dept\koko") TYPE XL5
2. Once you created the Excel file you can open it with automation and name the Sheet any way you want.
*-- Create Ole Automation with Excel
	loExcel = createobject("Excel.Application")
*-- Open XLS File
	loExcel.application.WorkBooks.open("c:\dept\koko.XLS")

	loExcel.DisplayAlerts = .f.

           loExcel.application.application.WorkBooks(1).Sheets(1).Name = 'My Custom Name'
          loExcel.save()
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform