Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Office 2007 compatibility issues
Message
De
25/02/2007 17:56:11
 
 
À
17/02/2007 17:35:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01191826
Message ID:
01198694
Vues:
10
>>>I sought confirmation of what has been reported. I wanted to find out whether the devteam recognizes the incompatibility issue.
>>>
>>
>>Define a crash, Peter. Is it an unhandled Win32 exception or an unhandled VFP error? The second is likely if the app doesn't use proper error handling. The first potentially might happen, I don't have a proof that it will never happen.
>
>I get the impression that there has been some miscommunication between us. Let me try it again. I'll no longer short cut using the word 'crash'.
>
>In my mind I have this mental picture of an either hypothetical or existing application that knows about 'the' different xls-versions so far. With e.g. getfile() the user can point to an xls-file. That file is processed with the IMPORT command. There is an error handler in effect. If TYPE XLS fails, the application will try TYPE XL5. If that one fails it will try TYPE XL8. And indeed, the professional developer will have implemented the OTHERWISE in case even that one fails. (I guess that one will have been programmed anyway to tackle all files that are not Excel at all.)
>
>Now, what I'm asking is whether or not it is true that vfp's IMPORT command will fail for Excel 2007 files that have been produced with the normal Save option. And if that is confirmed, whether or not it is regarded as a compatibility issue. Yes?
>
>(What comes to my mind now: In case the import fails, it may well be that the application will show a messagebox claiming that the file is not an Excel sheet. Where in fact the messagebox should also mention the possibility that it may also be a newer, not supported type of Excel sheet.)
>
>
>>>2) Are you saying here that the developer has no other choice than, either to change the code in the app, or to instruct the suppliers of the xls-sheets to deliver an older Excel file format?
>>>
>>
>>What I am saying, Peter, is that there are no plans to enhance IMPORT command to support new file formats. The choices that you've listed here should work. Whether these are the only choices? I don't know, professional developers may find some other choices.
>
>So, I guess the official POV is that the developers are adviced to instruct the users to ask their xls-sheet suppliers to deliver only older formats, formats up to Excel 97. Yes?
>
>And we are also adviced to, whenever possible, use other methods of importing Excel sheets. Yes?
>
>To be straight about it: A simple yes (compatibility issue), yes (instruct users), yes (use other methods) is okay with me. Afterall, the documentation explicitly claims support only for the older formats.
>
>In case of 3 times yes, the only remaining issue for me would be that it strengthens those who get the impression that vfp is at the end of its lifecycle. Let me make clear that I have never been one of them, so far.
>
>Tip: Your answer to this one might be that it's rather only the end of the life cycle of the IMPORT command. In that case, I suggest the next SP contains a remark about that in the command's documentation.



Hi Peter,

You keep mentioning some “official POV”. I don’t know what do you mean by that, all I can offer to you is my personal point of view.

It is true that IMPORT command fails for some documents produced by Excel 2007.

Let’s take a look how IMPORT command is documented:

XLS
Include XLS to import data from Microsoft Excel worksheets versions 2.0, 3.0, and 4.0. Columns from the worksheet become fields in the table and the worksheet rows become records in the table. Worksheet files created in Microsoft Excel have an .xls extension.

XL5 [SHEET cSheetName]
Include XL5 to import data from Microsoft Excel version 5.0. Columns from the worksheet become fields in the table and the worksheet rows become records in the table. Worksheet files created in Microsoft Excel have an .xls extension.

If you omit the SHEET clause, the data in Sheet1 is imported. To import data from a specific sheet, include the SHEET keyword and specify the sheet name with cSheetName.

XL8 [SHEET cSheetName]
Include XL8 to import data from Microsoft Excel 97. Columns from the worksheet become fields in the table and the worksheet rows become records in the table. Worksheet files created in Microsoft Excel have an .xls extension.

I don’t see the documentation mentioning support for Excel 2000 or Excel 2003 documents. If I were you, I wouldn’t get that surprised by the fact that IMPORT rejects Excel 2007 documents. I don’t see any statements that would make me to believe that I can use IMPORT command in my application and the app will be able to import a document from any arbitrary version of Excel. No argument, this would be very convenient, but the documentation doesn’t imply that this is going to happen.

One may expect the command to be enhanced to support new file formats with time. This is like playing a lottery and expect to win, you may win, but then again you may lose because no one promised you to be the winner. You may lose this time, but win next time, it is up to you whether you want to continue to play. However continuing playing, usually, doesn’t increase your chances to win (some may disagree, but this is my POV).

What I can tell you, is that, at this moment, there are no plans to enhance IMPORT command to support new file formats whether they are Excel documents or not. It doesn’t mean that this will absolutely not happen in the future, but, in my opinion, this is very unlikely. However, since the decision for all times hasn’t been made, I don’t think there is anything to change in the documentation.

If you were to ask my recommendation on how to implement an application that relies on importing Excel documents and should be able to handle recent file formats or file formats introduced in the future, I would recommend you to use standard APIs exposed by Excel. What to do with applications that are already out there? I don’t think you need any recommendations from me here. It depends entirely from you and your relationship with your customers: you may enhance the app for free, enhance for a fee, don’t enhance, don’t enhance and recommend to save documents using older file formats, something else.

Opinions expressed in this post are my personal opinions and shouldn’t be considered as some “Official POV”.

Thanks,
Aleksey.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform