Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creation of excel file
Message
De
10/05/2013 14:56:09
 
 
À
10/05/2013 12:29:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01573434
Message ID:
01573475
Vues:
51
>Hello all,
>
>I create a cursor and then I do the following
>
>COPY TO NameOfFile TYPE xls
>
>Is there a way to add programmatically a password to that file?
>
>Oh and by the way that file will be read by LibreOffice.

You can automate LIbreoffice, but I would recommend using using the OpenDocument Spreadsheet (Flat XML) (.fods) format.
The fods file is a flat XML text file that is easily manipulated.

Create a spreadfile with example data and format the cells (add graphs if need be).
Save the spreadsheet as OpenDocument Spreadsheet (Flat XML) (.fods)
Open the XML document (file does not use CR LF, so use something other than windows notepad)
Add tags that will be replaced by your program including scan/endscan loops.
I am using WestWind expandtemplate for most of that on the foxpro side since I already have it, but other tools will work.
The document can then be opened by Libreoffice.
You can also use the command line converter to convert it to an xls file or pdf file.

Ken
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform