Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert to excel
Message
From
09/09/2005 14:25:48
 
 
To
09/09/2005 04:42:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01047848
Message ID:
01048226
Views:
20
>hi,
>thank you very much,it works,
>
>if my fields as char1,char2....etc
>
>any way to change(rename) title of XLS.fieldS as char1=telno,char2=name....
>
>via same code
>
>USE am2
>*GETFILE()
>gcDelimName = ALIAS( ) + '.xls'
>gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>IF EMPTY(gcDelimFile)  && Esc pressed
>   CANCEL
>ENDIF
>COPY TO (gcDelimFile) FIELDS char1 ,char3 , char7, char8, char9, char13 ,char25, char26, char27, char28   XLS
>
>
>
Not to beat a dead horse, but using meaningful names for database fields and form controls might have helped here. On the other hand, everything is now in place as you originally named it, so let's go from there. Try
SELECT char1 AS telno ,char2 AS name .... FROM am2 INTO CURSOR curTmp

COPY TO (gcDelimFile) XLS
>>Try
>>COPY TO (gcDelimFile) FIELDS f1,f2,f3,...fn  XLS
>>
>>
>>>hi,
>>>thank you,
>>>i try via vfp help as
>>>When the field list specified using COPY TO...FIELDS does not include the field that uses autoincrementing.
>>>
>>>i don't understand what i must do
>>>
>>>but i try as under, iget error messages
>>>
>>>COPY TO fields (gcDelimFile) XLS && error message Invalid path or file name
>>>
>>>COPY TO (fields) XLS && error mesage Variable "fields" is not found
>>>
>>>COPY TO (gcDelimFile)fields XLS && error mesage Variable "xls" is not found
>>>
>>>COPY TO (gcDelimFile.fields) XLS && error mesage "gcDelimFile" is not an object
>>>
>>>
>>>thanks.
>>>
>>>
>>>
>>>i try as
>>>>>hi all,
>>>>>
>>>>>any idea ,to convert mytable to excel book,
>>>>>
>>>>>just fields have data only,
>>>>>this code under convert all fields
>>>>>
>>>>>USE am2
>>>>>*GETFILE()
>>>>>
>>>>>gcDelimName = ALIAS( ) + '.xls'
>>>>>
>>>>>gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>>>>>
>>>>>IF EMPTY(gcDelimFile)  && Esc pressed
>>>>>   CANCEL
>>>>>ENDIF
>>>>>
>>>>>COPY TO (gcDelimFile) XLS   && Create delimited file
>>>>>
>>>>>
>>>>>
>>>>>thanks.
>>>>
>>>>Check COPY TO command in Help. This command has FIELDS clause.
Previous
Reply
Map
View

Click here to load this message in the networking platform