Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting to Excel file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01660147
Message ID:
01660163
Views:
43
>>>>>Hi,
>>>>>
>>>>>Whenever I export a file from VFP 9 application (either using EXPORT TO or Createobject("Excel.Application")) and then open the resulting Excel file, I get the message (as shown in the attached image). Then, when I click on Yes (that is to open it anyway), I don't seem to see any problems with the Excel file content?
>>>>>Why then MS Excel shows this message?
>>>>>TIA
>>>>
>>>>I believe you'll see this is you EXPORT with TYPE XLS. Similarly, make sure you're choosing an appropriate format when you save the file via Automation. There's a parameter for SaveAs that lets you specify the format you want. If you're creating an XLSX file, give it that extension.
>>>>
>>>>Tamar
>>>
>>>As far as EXPORT to, I changed the type to XL5 (as you suggested).
>>>
>>>And as far as saving as XLSX with SaveAs, would the customer who has an older version of Excel (e.g. 2003) have a problem opening the .XLSX file?
>>>
>>
>>Yes. So use an older version and just make sure you specify which one you want in SaveAs. I'd go with the latest version that isn't XLSX.
>>
>>Tamar
>
>Thank you. This is what I will do; leave as it is (EXPORT TO TYPE XL5)

If you'll allow me to widen the scope of this slightly, I feel I must warn you that your power users using recent versions (xlsx) of excel, will not be grateful if you deliver xls files. It all depends of course how big they (the files) are and what users will want to do with them. But be advised that large xls files tend to freeze Excel when you try to do something more meaningfull than just printing or email the contents. It's also not enough to .Saveas. To use the files in xlsx mode, they (users) need to close and reopen them.

You might want to consider configuring the version of excel you produce. You can still use EXPORT TO TYPE XL5, but when your user requested xlsx via configuration, you can, in createobject mode, open the workbook and saveas in the appropriate version and delete the .xls.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform