Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating spreadsheet file with images from report
Message
De
06/11/2016 07:36:56
 
 
À
06/11/2016 07:14:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01642788
Message ID:
01642802
Vues:
37
>Thank you.
>
>Interesting links.
>
>I looked into Alexandre ExcelListener method AfterReport listener method xlsx file creation and Opendocument Spreadsheet .ods file content.xml file.
>It looks that they have similar information , only tag and attibute names are different.
>My idea:
>
>Setup:
>Save some spreadsheet in Excel to templates\OpendocumentSpreadSheetTemplate.ods file
>
>Runtime
>
>1. Modify Alejandro ExcelListener afterReport method to create content.xml file and
>save images to media subdirectory
>2. Use the commands to create and open report in LibreOffice or Excel:
>
>
>copy file ..\templates\OpendocumentSpreadSheetTemplate.ods myreport.ods
>run zip myreport.ods  content.xml media\*.*
>run  myreport.ods 
>
>
>Is this reasonable ?
>
>>>
>>>I need only fods, ods or similar spreadsheet file with images creation.
>>
>>If you can build a cursor with all the information needed in the XLSX, you may export the cursor with one of the XLSX libraries openly available for VFP, including source code, and adapt it to incorporate images:
>>
>>Greg Green's: http://vfpx.codeplex.com/wikipage?title=XLSXWorkbook
>>
>>Vilhelm-Ion Praisach's: http://praisachion.blogspot.com/ (several libraries).

I believe that there is a constraint on the .ods format that requires that an uncompressed file - mimetype? - leads the package, in order to be identifiable by mimemagic processors. I don't know if the zip command you're planning respects that or not, but you may have a try.

I didn't check on differences between 2003-xml and content.xml, but if you say that it's just a matter of changing tag names, then I would say it would at least worth the try. You can also leave Alejandro's library unchanged, and perform the transformation on the resulting XML (if you're confident with XSLT or other XML transformation language).
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform