Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saveas: do not keep incomp. functions, do not keep changes
Message
From
24/07/2007 10:06:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Saveas: do not keep incomp. functions, do not keep changes
Miscellaneous
Thread ID:
01243150
Message ID:
01243150
Views:
72
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
Next
Reply
Map
View

Click here to load this message in the networking platform