473,408 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Import Excel data with Access VBA (complex)

255 100+
Before asking the question I've been digging a hole that is deep enough to bury myself in google....Most of the results are simply importing the excel file to table with the same table structure.

What I need to ask, is looking for solution to import the excel data with specific column to specific fields in the tables. For example, I have excel file contains all student information, including their academic results, payments, etc..without separating into multiple worksheets. While in the access database I had split those information into tables, with new field names, ID and so on to setup the relationships.

My progress so far is able to open the excel file and get its workbook name. But I'm having trouble with importing the data into the tables one by one. Any help is greatly appreciate.
Oct 26 '10 #1
4 2888
ADezii
8,834 Expert 8TB
  1. Why can't you simply Import the Excel data in Normal fashion, and then use a series of Append Queries to push the Data wherever you want?
  2. Link to the Excel Worksheet, then manipulate the Data?
  3. Access the Excel Workbook directly via Automation Code, directly adding to Tables via Recordsets?
Oct 26 '10 #2
colintis
255 100+
The excel file also contains some additional descriptions to some blank cells, which will mislead the database to recognized as part of the actual table data. It is something i want to skip, as there's also blank spaces in between the records and the descriptions.

Something new from the target user. The target user preferred to remove the excel file once everything have merged into Access, and there's some extra files that required to group all necessary data together in Access. So its breaking down those data into a new set of structure....
Oct 26 '10 #3
ADezii
8,834 Expert 8TB
How about a Sample Excel File, along with the Descriptions of the Access Tables (with Field Names, Data Types, etc) to which the Data will be pushed. Without a detailed explanation of all Components involved, a possible solution will not be forthcoming.
Oct 26 '10 #4
colintis
255 100+
I had found out a method with the link table idea ADezii written in post #2. Basically I use vba to import the excel as a link table into Access, and make 2 recordsets (1 for excel 1 for access's table) to add them into the access table, after that vba will remove the link table.

I'm still organising this with more than one Access table to store the link table's data, i'll put the codes up later either it success or not
Oct 29 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Rathtap | last post by:
I want to set up the import of data from an excel file into SQL Server from my ASP.net (C#) application. The user will select the file that needs importing. I want to use DTS to do this. I was...
6
by: Syvman | last post by:
Here's what I've got: I'm trying to grab some data out of an Excel spreadsheet and bring it into Access. I'm able to do it, but only if the Excel spreadsheet is not opened by any other users. I...
3
by: Santa-D | last post by:
I've got an excel sheet that I need to import into a table, however, I want the function to automatically manipulate the data prior to it being imported. For example, i have a field called and...
10
by: Niklas | last post by:
Hi Before I start coding I need to be sure that nobody else has not done it yet and that I can use it. I need an import utility which import data from Excel to a database or some object in...
4
by: pcoder | last post by:
i need to import Excel data into Mysql database. How can i do it. Is there any utility or any script can do it. Thanks in advance.
3
by: edralyn | last post by:
can i ask something? i had a problem in my system i'm just a beginner in making a system...my problem was how cud i connect i export an excel data to my system...please reply...i badly need it
0
by: levis123 | last post by:
hi, anybody know how to import excel data into sql server using asp.net (vb.net). i've read some articles in the internet, however, try to implement it seems...still have problems...any1 who solved...
0
by: ghazal01978 | last post by:
hi all I need some help how to import excel data into sql server using vb6? I have a sub , and used that but for many fieldes had problem , although those fields had text format data , vb...
3
by: MarcGA | last post by:
(Excel 2003, Access 2003, XP, novice user here) I can't get Access to accept multiple Excel files to the same table. I can import the spreadsheets to a new table, but I need to import 23...
0
by: prashantdixit | last post by:
Hi, I have beent trying importing Excel data with one column containing PDF/JPEG file name to access 2007. I have a Excel file with few columns One of the columns named as "Reference". The...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.