Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling Excel - TXT conversion to XLS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01467227
Message ID:
01467249
Vues:
42
>>>Hi Gang!
>>>
>>>I have a textfile created by a report in VFP 8.0 SP1. A client wanted the report output to be also in a TextFile (done), and also an Excel spreadsheet.
>>>
>>>Do any of you have or can point to VFP that checks for the existence of Excel on a PC or Network, and then read in the Textfile and convert to an equivalent XSL file?
>>>
>>>Thanks in advance!
>>
>>If you create CSV file, Excel will be able to open it.
>
>What they want,is a text file that looks exactly like the report output from the report writer (minus the fonts, boldface, color, etc...). So, a CSV won't help me in this case.
>
>This has been done by outputting to a method that creates the textfile from the top down, line by line using FPUTS.
>
>As for the EXCEL spreadsheet, they want to have the option when selecting output to choose spreadsheet. So, when this is chosen, the above metioned textfile could be output automatically into EXCEL format (so they won't have to input it and then save as....).
>
>But, I need some sample code that detects if EXCEL is installed, and if so, to read in the textfile and then output it line by line as a spreadsheet.
>
>Thanks!

Usually we prepare a cursor for the reporting.
Our report Always have ONE cursor and nothing more.
No relations, no second tables/cursors.
Everything is done BEFORE we call the report.
So it is easier, just take the report cursor and use:
1. You want to text?
Sure ?/?? will do it
2. You want Excel
COPY TO .... XLS will do it.

BTW did you tried XFRX or FRX2ANY?
(both are commercial products)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform