VFP and Excel

K

Ken

I have a VFP table that I exported to an xls file.
I then use Excel to stir the data around.
When I go to import the data back to a VFP table,
7 of the 74 fields are not added to the table making
the table unusable as far as accuracy is concerned.

Is there a way to get all the fields to import?
I am using VFP 6 and Excel 5.

Thanks anyone for answering.
 
C

Cindy Winegarden

In [email protected],
Ken said:
I have a VFP table that I exported to an xls file.
I then use Excel to stir the data around.
When I go to import the data back to a VFP table,
7 of the 74 fields are not added to the table making
the table unusable as far as accuracy is concerned.

Is there a way to get all the fields to import?
I am using VFP 6 and Excel 5.

Hi Ken,

How are you importing? I usually use CREATE CURSOR in VFP and then APPEND
FROM the XLS file. Any mis-matches of data types? I've had problems when
there are commas in numbers, etc. so sometimes I even export the Excel file
to a CSV file and then APPEND FROM that in VFP.

Also, try setting the print area to the data you want. Sometimes if data is
outside the original print area it won't be picked up.
 
K

Ken

-----Original Message-----
In [email protected],


Hi Ken,

How are you importing? I usually use CREATE CURSOR in VFP and then APPEND
FROM the XLS file. Any mis-matches of data types? I've had problems when
there are commas in numbers, etc. so sometimes I even export the Excel file
to a CSV file and then APPEND FROM that in VFP.

Also, try setting the print area to the data you want. Sometimes if data is
outside the original print area it won't be picked up.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
(e-mail address removed) www.cindywinegarden.com



.
I open up FoxPro and enter in the command window this:

import from ken.xls type xl5 sheet ken

I have also used type xls and xl8 and always get the same
results, except this morning when the N column was added.
I am still missing fields Z, Bd, Bf, Bg, Ch, and Ci. I
have done this sort of thing many times and never had a
problem getting all the data to import.

As far as mis-matches in data types, since I don't specify
the data has any type, I am assuming that FoxPro will
accept any data that comes along. There are no commas or
special characters in the data.

I will try your suggestion about create cursor and see if
that will improve the success rate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top