Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 7.0 or VFP 9.0 automation with Excel

Status
Not open for further replies.

psperry2

Programmer
Nov 7, 2007
141
US
I am at the planning stages for a new project. I have been asked to create an Excel Spreadsheet that can be distributed to everyone with a Company Car. (70 + employees) The spreadsheet would allow employees to report personal mileage and Gasoline expenses. We are currently using Office 2003. I could choose either VFP 7 or 9.

Am I going to have problems getting Foxpro to read from Excel 2003 files? Should I choose VFP 7 or 9 for this project?
 
No matter what VFP you'll choose the automation is the same. BUT I'll choose VFP9 :)


Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Hi Psperry,

You shouldn't have any problem reading Excel 2003. It's 2007 that causes difficulties, but that only applies if you want to read a workbook using native VFP commands, like IMPORT and APPEND.

If you are using Automation, you should be fine with any recent Excel version.

As for the choice between VFP 7.0 and VFP 9.0, I can't think of any good reason not to use current version.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
There are a number of FAQ's about automating Excel through VFP.
Look at some of the specific examples are: faq184-4428

Note: Based on having to daily update Excel files with new data as though it were a data table, I have to say that Excel makes a lousy data table. My application does this, but there are can be so many subtle things (like the specific spelling of codes, names, etc.) which can throw the automation off.

For example, when having to update Excel file data on a daily basis requiring the finding of specific worksheets, specific date columns for individual non-sequential rows, this can take a good bit of automation coding.

It is MUCH better and MUCH easier to keep and update data in a VFP data table and then output the data to an Excel file when needed.

I'd highly recommend that you have your users view and update their data into a VFP form which writes the data to a VFP data table. Then when they want it in an Excel format, output it form them then.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top