Go Premium for a chance to win a PS4. Enter to Win


data import from excel to access

Posted on 2002-04-30
Medium Priority
Last Modified: 2010-05-02
i want to make such interface that first choose the database whether MS Access or SQL Server where data hast to be imported from excel file.Then according to the database selected, choose access file or sql database.After that choose the table (assuming that the fields in the excel file and fields in access or sql server table are same)then choose the excel file from which data has to be imported to the access file or sql databse.

while importing data the care should be taken that if there are any changes in the existing records in excel those have to be updated in the access file or sql database.And the new records should be appended. while updating ask the user that "data already exists, do u want to overwrite or not" like yes, yes to all, no, no to all msgbox.

how can it be done using class because this has to be done in ASP again. In ASP we cannot get the message box and all so it would be great if you could send me codes for this problem.If possible could you please send me the ASP codes for the same.

i need to make it as component later.could you please tell me how can i make this a component.

hope to hear shortly


Question by:blueberry113
  • 3

Expert Comment

ID: 6980013

Accepted Solution

n_narayanan earned 300 total points
ID: 6980015
For New Records you can append using this code



Author Comment

ID: 6985188
thanks a lot for your help.

actually i dont need to create any access file.
1.assume that there's already an excel file and access file with table(fields are similar to the excel).we have to use common dialog control to browse those files.

2.select an access file and table(displaying tables of corresponding access file), then select excel file from which data needs to be imported.

3.lets suppose at first we import data from excel to access. then if we append some data in excel those records have to be appended in the access file when we click on IMPORT button.But if there are any changes in the existing records as well as some new records in excel file  then the records should be updated as well as new records should be appended in access file.

4.we have to check thro ID only.If we find any changes in the existing records then we have to give message that this data exits, do u want to overwrite or not.we can give options like update, update all,cancel and cancel all.

5.i have almost done this but i need to make this using CLASS.

it would be appreciated a lot if you could send me the codes for the above using Class.


Expert Comment

ID: 6985215
Thanks blueberry

If your code is working, we can easy convert that into Class. Send me your code, I will try to convert it into class module.



Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question