Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saveas: do not keep incomp. functions, do not keep changes
Message
De
24/07/2007 10:06:56
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Saveas: do not keep incomp. functions, do not keep changes
Divers
Thread ID:
01243150
Message ID:
01243150
Vues:
73
I use Excel by automation, to convert XLS to DBF.

I do:
loExcel = CREATEOBJECT("Excel.Application")
loExcel.Workbooks.Open("Somefile.xls")
loExcel.Workbooks.SaveAS("Somefile.dbf",8)  && Convert to dbf 3
loExcel.Workbooks.Close(0)  && Close, do not keep changes
loExcel.Quit
This does the job, without user interface, BUT not for all XLS-files. Some of them convert completely, some of them only convert the first 2 or 3 columns.

When I do it manually, so I press SaveAs fom the menu, choose dbf 3, choose Yes (leave incompatible functions out), close the window, choose No, I always get ALL columns.

So, somewhere in the statements above something is missing, telling Excel to convert all columns.

Should I state somewhere the equivalent of "leave incompatible functions out"? How?

TIA

Lennert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform