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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing data from excell sheet

Status
Not open for further replies.

ShyFoxBack

Programmer
Joined
Feb 24, 2004
Messages
18
Location
RO
Hy
I have an excel sheet with some data exported from other program. Now I want to import datas from it filtering it by the Date of the article and the SpecialCode of it. The excell sheet has 10 fields and my table has only 6 but the names are the same. I also want to know How I can import only the 6 fields I need.

Regards
 
ShyFoxBack

I would suggest you use Automation (there are 5 or 6 FAQs on the subject).

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
You could setup a temporaray table with a structure that matches the spreadsheet (10 fields) and import into that. Use the temp table to update into your working table.



Jim Osieczonek
Delta Business Group, LLC
 
Is this Import something you are going to be doing on a regular basis?

If this is a one-time Import you can do it a variety of ways.

If this is to be done regularly then automation (as Rick suggests above) is the answer.
Using Excel Objects within your VFP code. Something like:
1. Insert new columns on the Left
2. Move or Copy the desired Columns into the New columns
3. If needed, insert a Row #1 - "Field" row
4. Set Excel Column Width to desired DBF Field width
5. Select ONLY the new columns and limit the Selection to only the bottom Row up.
6. SaveAs selected columns Only as a DBF4 file
7. etc.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top