adrian.stock22
Registered User.
- Local time
- Today, 15:24
- Joined
- Mar 21, 2004
- Messages
- 57
Hi, All,
Appending an Excel file to an Access table
------------------------------------------
Just now I tried to convert an Excel file (let's call it source_1.xls) into an Access database (Access 2000). The first line of the Excel file represents the field names in the database.
I opened the Access program, clicked on 'Blank Access database', named the desired Access file, and saved it as fred.mdb
I clicked file | get external data | import |
and selected source_1.xls, then clicked import
The following unhelpful since unspecific error msg came up:
"Wizard unable to access information in file xyz. Check that file exists and is in correct format."
Can anyone please tell me what to do?
--------------
A puzzling aspect of this affair is the following:
A couple of weeks ago when first trying to make this conversion from Excel into an empty database I did succeed, but unfortunately it was so easy that I did not see the need for writing down what exactly I did, and now I cannot reproduce it.
But the files left over from that experiment are puzzling and may shed light on my current problems.
For safety reasons I made, at that time, a copy of file source_1.xls (let's call it source_2.xls) and renamed it. Looking at the two source files I can see no difference between them. Both have the same number of records and fields. Both have the field names in the first row.
Now the miracle:
1 source_2.xls (88 kb) is almost exactly twice as large as source_1.xls (43 kb).
2 source_2.xls imports into Access OK without the above error msg.
What on earth could I have done to the Excel file to double it in size and to make it acceptable to Access for import?
Could it have something to do with delimiters that I have forgotten?
-----------------------------------
Now to the overall context of this problem.
I regularly receive a fairly small Excel file (always in the same format) with addresses and I have to append these addresses to my Access database without fuss and error. Esp. I must avoid records becoming scrambled up (e.g. wrong name joined with wrong address by risky pasting into tables).
The file mentioned above is the first Excel file that arrived. I converted it into Access (but see problems mentioned above), then deleted a number of fields and added a number of others.
I took care not to alter the names of the fields which the Excel table and the Access table are intended to have in common.
In future (once or twice a month) I want to import the future Excel files into the existing database, by appending them. I expect Access to import, for each record, the matching fields in the Excel file, and ignore the non-matching fields (i.e. those which exist only in Excel or only in Access).
btw: It is ***not*** practicable for me to expand the Excel table manually to match the Access table.
Question: I there a utility in Access which could accomplish this.
Or: Is there a stand-alone utility (not too expensive) which I could use to convert the Excel table into a common format from which I can easily import it into Access in the way described.
What else can I do to accomplish what I need?
I have a voluminous book, 'Running MS Access 2000' by John Viescas, but do not know where to look for what I want (if it exists). Please refer me to a page if the answer is there?
If there is a Tutorial on the Internet which describes my specific problem, please refer me to it.
Many thanks for your help.
Adrian
Appending an Excel file to an Access table
------------------------------------------
Just now I tried to convert an Excel file (let's call it source_1.xls) into an Access database (Access 2000). The first line of the Excel file represents the field names in the database.
I opened the Access program, clicked on 'Blank Access database', named the desired Access file, and saved it as fred.mdb
I clicked file | get external data | import |
and selected source_1.xls, then clicked import
The following unhelpful since unspecific error msg came up:
"Wizard unable to access information in file xyz. Check that file exists and is in correct format."
Can anyone please tell me what to do?
--------------
A puzzling aspect of this affair is the following:
A couple of weeks ago when first trying to make this conversion from Excel into an empty database I did succeed, but unfortunately it was so easy that I did not see the need for writing down what exactly I did, and now I cannot reproduce it.
But the files left over from that experiment are puzzling and may shed light on my current problems.
For safety reasons I made, at that time, a copy of file source_1.xls (let's call it source_2.xls) and renamed it. Looking at the two source files I can see no difference between them. Both have the same number of records and fields. Both have the field names in the first row.
Now the miracle:
1 source_2.xls (88 kb) is almost exactly twice as large as source_1.xls (43 kb).
2 source_2.xls imports into Access OK without the above error msg.
What on earth could I have done to the Excel file to double it in size and to make it acceptable to Access for import?
Could it have something to do with delimiters that I have forgotten?
-----------------------------------
Now to the overall context of this problem.
I regularly receive a fairly small Excel file (always in the same format) with addresses and I have to append these addresses to my Access database without fuss and error. Esp. I must avoid records becoming scrambled up (e.g. wrong name joined with wrong address by risky pasting into tables).
The file mentioned above is the first Excel file that arrived. I converted it into Access (but see problems mentioned above), then deleted a number of fields and added a number of others.
I took care not to alter the names of the fields which the Excel table and the Access table are intended to have in common.
In future (once or twice a month) I want to import the future Excel files into the existing database, by appending them. I expect Access to import, for each record, the matching fields in the Excel file, and ignore the non-matching fields (i.e. those which exist only in Excel or only in Access).
btw: It is ***not*** practicable for me to expand the Excel table manually to match the Access table.
Question: I there a utility in Access which could accomplish this.
Or: Is there a stand-alone utility (not too expensive) which I could use to convert the Excel table into a common format from which I can easily import it into Access in the way described.
What else can I do to accomplish what I need?
I have a voluminous book, 'Running MS Access 2000' by John Viescas, but do not know where to look for what I want (if it exists). Please refer me to a page if the answer is there?
If there is a Tutorial on the Internet which describes my specific problem, please refer me to it.
Many thanks for your help.
Adrian