Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert to excel book
Message
From
09/09/2005 10:31:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
09/09/2005 10:08:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01048102
Message ID:
01048117
Views:
20
I think that with COPY TO, you can only create separate Excel files.

You can open Excel, and then do one of the following:
  • Copy and paste an entire sheet from one file to another.
  • Import a DBF file.
  • Insert the data, one cell at a time, or with the "Paste" command.

    Any of these actions can be controlled from Visual FoxPro. If you didn't use Excel Automation before, you should start by reading introductory material, for example, my article at http://www.utmag.com/wconnect/wc.dll?9,7,10,1562

    >hi all,
    >
    >any help idea ,to store(convert) this data via vfp code to 3 sheets at my xls.book
    >as.
    >"ADSL 1 " and all fields at one sheet1
    >"B ISDN " ----------------------sheet2
    >"LL " ----------------------sheet3
    >
    >
    >Select * from am ;
    >  where INLIST( val(char3), 100, 201, 202, 203 );
    > and ( inList( upper(allt(telno)), "ADSL 1", "B ISDN  ") or upper(left(telno,2)) = "LL" );
    >   into table am2 nofilter
    >
    >
    >CLOSE all
    >USE am2
    >
    >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 ,telno, char26, char27, char28   XLS
    >
    >DROP TABLE am2
    >
    >
    >thanks.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform