473,397 Members | 2,077 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,397 software developers and data experts.

Data from Excel to Access, Arrgghhhh ...

Hi all,
I will have to handle a lot of really 'nice' data in a LOT of Excel sheets. It is all about music files (Billboard top 100)
I am afraid there really is a sheet for every year ... (Don't know this for sure yet...)
I definitely need to get this data in Access and get it normalized. (sigh ....)
The data is so 'nice' for the Import- and TransferSpreadsheet-wizard that the 'wizard' really chokes on it ;-)

Either the data is not 'nice' indeed, or the wizard is just plain stupid, and assuming all kind of nonsense.
I am afraid it's the latter... AND the first.
Some errors: "To many fields" (256 indeed...), "Datatype conversion failed" or "Subscript out of reach".
Sometimes only: "There has been an error. The spreadsheet could not be added ..",
On some sheets the import partly 'succeeds' (Import of 114 records and an ImportErrors table of 2000 records).

Also a lot of the sheets need to be 'transposed'. (Columns <==> Rows)
I know when I add a new 'first' row with values like "~~" then the columns atleast are treated as text but ....it is a pain ...
Export to csv and import this csv to Access again works better but ...

Help please !! I really would like to automate this.
Anybody been there ?? What would be the best way to deal with this ?

Thanks
Arno R
Nov 13 '05 #1
13 3207

Arno R wrote:
Hi all,
I will have to handle a lot of really 'nice' data in a LOT of Excel sheets. It is all about music files (Billboard top 100) I am afraid there really is a sheet for every year ... (Don't know this for sure yet...) I definitely need to get this data in Access and get it normalized. (sigh ....) The data is so 'nice' for the Import- and TransferSpreadsheet-wizard that the 'wizard' really chokes on it ;-)
Either the data is not 'nice' indeed, or the wizard is just plain stupid, and assuming all kind of nonsense. I am afraid it's the latter... AND the first.
Some errors: "To many fields" (256 indeed...), "Datatype conversion failed" or "Subscript out of reach". Sometimes only: "There has been an error. The spreadsheet could not be added ..", On some sheets the import partly 'succeeds' (Import of 114 records and an ImportErrors table of 2000 records).
Also a lot of the sheets need to be 'transposed'. (Columns <==> Rows)
I know when I add a new 'first' row with values like "~~" then the columns atleast are treated as text but ....it is a pain ... Export to csv and import this csv to Access again works better but ....
Help please !! I really would like to automate this.
Anybody been there ?? What would be the best way to deal with this ?

Thanks
Arno R


Nov 13 '05 #2
A wise man from this very newsgroup told me when the going got tough
with A2003 Link Text Wizard and Excel to just copy & paste.

That turned out to be the best approach for me when the data in the
source columns were too mixed for the "Wizard" to handle.

Good luck. Charge by the hour.

Nov 13 '05 #3
rkc
Arno R wrote:
Hi all,
I will have to handle a lot of really 'nice' data in a LOT of Excel sheets. It is all about music files (Billboard top 100)
I am afraid there really is a sheet for every year ... (Don't know this for sure yet...)
I definitely need to get this data in Access and get it normalized. (sigh ....)
The data is so 'nice' for the Import- and TransferSpreadsheet-wizard that the 'wizard' really chokes on it ;-)

Either the data is not 'nice' indeed, or the wizard is just plain stupid, and assuming all kind of nonsense.
I am afraid it's the latter... AND the first.
Some errors: "To many fields" (256 indeed...), "Datatype conversion failed" or "Subscript out of reach".
Sometimes only: "There has been an error. The spreadsheet could not be added ..",
On some sheets the import partly 'succeeds' (Import of 114 records and an ImportErrors table of 2000 records).

Also a lot of the sheets need to be 'transposed'. (Columns <==> Rows)
I know when I add a new 'first' row with values like "~~" then the columns atleast are treated as text but ....it is a pain ...
Export to csv and import this csv to Access again works better but ...

Help please !! I really would like to automate this.
Anybody been there ?? What would be the best way to deal with this ?


Any chance of putting one of the troublesome spreedsheets somewhere
that it can be downloaded and looked at?

Nov 13 '05 #4
Any chance of putting one of the troublesome spreedsheets somewhere
that it can be downloaded and looked at?


Hi rkc

Thanks for your offer to take a look !
These sheets don't 'belong' to me.
It is client-data, so ... not on the web somewhere ...

If you can provide an email-address, I will be glad to mail you one of the sheets.
Or you can contact me: ar***********@tiscali.nl (Remove the obvious).

Arno R

Nov 13 '05 #5

<br********@comcast.net> schreef in bericht news:11*********************@g14g2000cwa.googlegro ups.com...
A wise man from this very newsgroup told me when the going got tough
with A2003 Link Text Wizard and Excel to just copy & paste.

That turned out to be the best approach for me when the data in the
source columns were too mixed for the "Wizard" to handle.

Good luck. Charge by the hour.

Thanks, but since it is all about music:

Randy Newman, 1972, Song: "Memo to my Son", Album: "Sail Away"
"When the going gets tough the tough get going"

Arno R
Nov 13 '05 #6
rkc
Arno R wrote:
Any chance of putting one of the troublesome spreedsheets somewhere
that it can be downloaded and looked at?


Hi rkc

Thanks for your offer to take a look !
These sheets don't 'belong' to me.
It is client-data, so ... not on the web somewhere ...

If you can provide an email-address, I will be glad to mail you one of the sheets.
Or you can contact me: ar***********@tiscali.nl (Remove the obvious).


My email address is in the message header.
Remove yabba.dabba.do. Change bomb to com.
Nov 13 '05 #7
Hi rkc,

I did send a zipped sheet to you some hours ago.
I am not really in a hurry wth this, so take your time.
Please let me know if you received it. I am not sure about your email address...

Thanks and good luck,

Arno R
Nov 13 '05 #8
Bri

Arno R wrote:
Hi all,
I will have to handle a lot of really 'nice' data in a LOT of Excel sheets. It is all about music files (Billboard top 100)
I am afraid there really is a sheet for every year ... (Don't know this for sure yet...)
I definitely need to get this data in Access and get it normalized. (sigh ....)
The data is so 'nice' for the Import- and TransferSpreadsheet-wizard that the 'wizard' really chokes on it ;-)

Either the data is not 'nice' indeed, or the wizard is just plain stupid, and assuming all kind of nonsense.
I am afraid it's the latter... AND the first.
Some errors: "To many fields" (256 indeed...), "Datatype conversion failed" or "Subscript out of reach".
Sometimes only: "There has been an error. The spreadsheet could not be added ..",
On some sheets the import partly 'succeeds' (Import of 114 records and an ImportErrors table of 2000 records).

Also a lot of the sheets need to be 'transposed'. (Columns <==> Rows)
I know when I add a new 'first' row with values like "~~" then the columns atleast are treated as text but ....it is a pain ...
Export to csv and import this csv to Access again works better but ...

Help please !! I really would like to automate this.
Anybody been there ?? What would be the best way to deal with this ?

Thanks
Arno R


Arno,

Excel is one of the more painful formats to Import from! And Linking is
worse! I find I get the best results when I import into an existing
table that already has the data types set to what they should be. This
way you don't get Excel telling you that a field is numeric when it is not.

CSV works better because you can override the 'detected' data type and
use other characters to deliminate text if the text contains quotes (I
use ~ as a delimiter most often because it rarely occures in data, but
you can try other characters as well, just pick one that is never in the
data).

HTH
--
Bri

Nov 13 '05 #9
rkc
Arno R wrote:
Hi rkc,

I did send a zipped sheet to you some hours ago.
I am not really in a hurry wth this, so take your time.
Please let me know if you received it. I am not sure about your email address...


It arrived O.K. Just got home from making a living so I haven't
looked at it yet.

Nov 13 '05 #10
rkc
Arno R wrote:
Hi rkc,

I did send a zipped sheet to you some hours ago.
I am not really in a hurry wth this, so take your time.
Please let me know if you received it. I am not sure about your email address...


O.K. I took a look.

That's an interesting layout you have there. You don't really have
a spreadsheet with multiple single records, you have a spreadsheet with
multiple tables with multiple records. I looks to me like every entry in
the first column would be a table in a normalized database. Each column
after that contains zero or many pieces of data for each table. There
are also what would amount to duplicate entries for some tables.

How are you at automating Excel?


Nov 13 '05 #11
Hi rkc,

(I translated the first column in the first sheet so you could understand the data)
That's an interesting layout you have there. You don't really have
a spreadsheet with multiple single records, you have a spreadsheet with
multiple tables with multiple records. I looks to me like every entry in
the first column would be a table in a normalized database. Each column
after that contains zero or many pieces of data for each table. There
are also what would amount to duplicate entries for some tables.
That's the problem indeed. I have to get this data in Access and get it normalized.
My first problem is the import in, export to Access.
If I have the data in Access, I can 'massage' it to my needs.
How are you at automating Excel?


I did some automation with Excel but ... I am definitely not a 'star' with that.
But also: I am not going to do this with 'cut and paste'... ;-)
I was thinking of creating a sub that imports certain data from a specified sheet; something like this pseudocode:
Sub ImportFromXLS(spreadsheet, sheet, range, optional transpose as boolean)
Open Excel with spreadsheet,
Copy specified range from specified sheet and paste to a new sheet (range transposed if indicated)
Import new sheet in Access
Close spreadsheet (without saving)
Close Excel
End sub

The specified range would be one or (in most cases) more separated selections.
Like: Range("1:2,13:16") ==>> without transpose I could have more than 255 fields in this case ==>> error
or Range("B1:IV2,B17:IV23") ==> I would have max 255 fields

Other ideas ?
In any case I could definitely need some help with this !

Arno R
Nov 13 '05 #12
rkc
Arno R wrote:
Other ideas ?
In any case I could definitely need some help with this !


Here's what the B column looks like with the names from column A
in capital letters seperating the groups of data. This was printed
to the immediate window in Access via automation. Tell me what you
want an export file to look like and I'll whip something up for
you over the weekend. Just for the fun of it.

Notice that some data groups have an entry that isn't really data, but
data about data. It's not consistent throughout the file though.

Example: TOPHITS has this enrty -> 14 t/m top 10
That's obviously not a song title.
<paste from immediate window>

TITLE RECORD
Rhyme tyme people

GROUP/ARTIST
Kool & The Gang

IN OTHER BILLBOARD LISTS
Soul (no 3) '74 -'75

USED IN

SCORE IN OTHER COUNTRY'S

OTHER HITS SAME YEAR
Spirit Of The Boogie/Summer Madness
Caribean Festival

HITS FOR OTHER GROUPS/ARTISTS

COVERS OTHER GROUPS/ARTISTS

AWARDS

TOPHITS
14 t/m top 10
1. Celebration (80-81, US no 1, UK top 10) NL no 2
2. Joanna (83-84, US-UK no 2) NL tip
3. Cherish (85, US no 2, UK top 5) NL top 5
4. Get Down On It (82, UK no 3, US top 10) NL top 10
5. Jungle Boogie (73-74, US top 5)
6. Too Hot (80, US top 5, UK top 30)
7. Hollywood Swinging (74, US top 10)
8. Ooh La La (Let's Go Dancing)(82-83, UK top 10, US top 30)
9. (When You Say You Love Somebody) In The Heart (84, UK top 10) NL tip
10. Ladies Night (79-80, US top 10, UK top 10) NL top 20
11. Fresh (85, US top 10, UK top 20) NL top 40
12. Misled (84-85, US top 10, UK top 30)
13. Victory (86-87, US top 10, UK top 30) NL top 30
14. Stone Love (87, US top 10, UK top 50) NL top 30

LP
Light of Worlds

AWARDS
RIAA; Gold (18-aug-75)

SONGS HITS
Street Corner Symphony
Fruitman
2. Rhyme Tyme People (75, top 70)
Light of Worlds
Whiting H. & G.
You Don't Have to Change
1. Higher Plane (74, top 40)
3. Summer Madness (b) (75, top 40)
Here After

</paste from immediate window>
Nov 13 '05 #13
Hi rkc,
Here's what the B column looks like with the names from column A
in capital letters seperating the groups of data. This was printed
to the immediate window in Access via automation. Tell me what you
want an export file to look like and I'll whip something up for
you over the weekend. Just for the fun of it.


Looks good !
I just mailed you; this discussion is better continued off-line don't you think?

Thanks for your time,
Arno R
Nov 13 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works...
1
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed...
3
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown....
0
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the...
11
by: Hi5 | last post by:
Hi, I am new to access I usedto work in Oracle and Mysql. I am after a way that enables me to populate a database I designed in access with lots of data which can be sorted in excel sheets, ...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
7
by: semijoyful | last post by:
OS: Win XP SP2 Access version: 2003 Excel version: 2003 I am new at this, as I am sure you have gathered from this post title:) I am working on a form where users can input data in Access and...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
7
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.