Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bryan Gerlach
  Where is Bryan Gerlach?
 Texas - United States
 Bryan Gerlach
 To: Cetin Basoz
  Where is Cetin Basoz?
 Cetin Basoz
Subject: RE: import from excel to dbf
Thread ID: 373797 Message ID: 373835 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, March 27, 2013 5:09:08 PM         

> > Hello. I have a few clients who would like to be able to import their excel files into dbf files (one example would be to import names & addresses from an excel file into the foxpro table). I have developed a form where they can choose an excel file and a target dbf file. After these two files are selected, the user has to match up columns from the excel file to columns in the dbf file. I do this by creating a cursor with two columns (source and destination). All of the destination (dbf) columns will be in this cursor and displayed in a grid, then the user must type the corresponding column name from the excel file into the source column on the cursor.
> >
> > All of this is working correctly, but I was wondering if anyone knew of any other code or class that would make this easier for the user. One thing that I would like is to allow the user to match up the columns somehow by using the mouse so that they don't have to type in column names manually.
> >
> > I would appreciate your input and suggestions.
> Bryan,
> I have released Foxyclasses to community. It has 'importer' class in it. Within that there is a page that does the 'mapping' from input grid to columnNames grid using drag&drop. You can download it from:
> http://www.medikosoft.com/cetin/FoxyClasses.zip
> and study its code or get parts of it or use it as you wish (but you should do the understanding, reading documentation etc stuff yourself or ask to community, not me). That form and class is designed for CSV/Delimited imports and might not be very easy to understand. At least you can adapt the drag & drop mapping to your case.
> PS: One another easy mapping would be to use OleDragDrop between List or Grids (which wasn't available when FoxyClasses importer designed).

> Cetin Basoz
> .Net has got better.Think about moving - check my blog:
> My Blog

> MongoDb Certified Developer
> MongoDb Certified DBA

> Support Wikipedia

Thank you.


import from excel to dbf Posted by Bryan Gerlach @ 3/27/2013 7:06:20 AM
RE: import from excel to dbf Posted by Cetin Basoz @ 3/27/2013 10:31:51 AM
RE: import from excel to dbf Posted by Bryan Gerlach @ 3/27/2013 5:09:08 PM