Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Error with Excel opening a DBF file
Message
De
13/06/2017 01:17:36
 
 
À
12/06/2017 19:21:07
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01651937
Message ID:
01651956
Vues:
48
>>>An app has a function to save VFP data as a .XLSX file. The code below is 100% reliable on machines running Excel 2007 on Windows 7. On some machines with Windows 10 and Excel 2016, it fails when a call is made for Excel to open the FOX2X file.
>>>
>>>Does anyone have any ideas why Excel 2016 and/or Win10 might not like this code?
>>>[...]
>>
>>Why not just COPY ALL TO ( m.lcDBF2X ) TYPE XLS?
>>(of course you should change extension)
>
>Unfortunately that makes no difference. It returns "OLE error code 0x80004005: Unspecified error." on trying to open the .XLS file.
>
>We need to open the file in Excel for some post-processing (updating column header names etc).

Can't you consider using any of the VFP to XLSX libraries available (Greg's or Vilhelm-Ion's, for instance) and pass the data already as a current Excel document? If the changes you are requiring are just small ones, it might eventually remove the need for Excel.application going into the process.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform