Computing.Net > Forums > Office Software > Importing problems

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Importing problems

Reply to Message Icon

Name: rex_p
Date: August 23, 2005 at 08:14:12 Pacific
OS: xp
CPU/Ram: enough
Comment:

Good morning, I need to import a large spreadsheet into Access 2000 from Excel 2000. I have already done a couple of test runs, and the only problem I have is that many of the cells in Excel have comments as well as data. The data transfers fine, but the comments get dropped. Does anyone know how I can import these comments along with the rest of the data? Thanks for any help!
Rex



Sponsored Link
Ads by Google

Response Number 1
Name: A Certain TH
Date: August 23, 2005 at 12:37:04 Pacific
Reply:

Hi Rex

Access is trying to define the column that the data is in as a data field, and by doing so is trying to decide on a type. Thats reasonable as its a database, not a spreadsheet. The type it is choosing is a numerical type (Integer, Single, Double, etc) and so text has no place and is ignored.

I'd recommend one of two routes:

1) Define the field (during import) as a text field. It will pull everything in, but it will be text from then on, so you won't be able to use it for numerical functions without doing conversions.

2) Split the data in your Excel sheet into 2 columns. 1 for the data, and one for the comments. This is pretty easily done - and Access will handle both much more efficiently.


Cheers
Tom


0

Response Number 2
Name: A Certain TH
Date: August 23, 2005 at 12:49:14 Pacific
Reply:

Just re-read your post - if your comments are not normal text, but are comments (as Excel defines them) then do the following:

Copy your data, then choose a fresh column, right click a cell and choose Paste Special. Then, from the pop-up box, select Comments only.

Then open your VBA editor (Alt + F11) and paste this in:

Sub ConvertComments()
Dim xCell As Range
For Each xCell In Selection

If xCell.Comment.Text <> "" Then xCell = xCell.Comment.Text
Next xCell

End Sub

Then hit F5 to run it (you may need to reselct the comments range, and you may also need to ensure that the cursor is within the body of the macro text)

Then you can delete the text and close the VBA editor


NOW your comments will be recognisable by Access!

Hope that helps if the above didn't
Tom


0

Response Number 3
Name: rex_p
Date: August 23, 2005 at 16:01:34 Pacific
Reply:

Thanks Tom, you have it right in your second post. Users have added comments in at least 3 columns of the spreadsheet I am trying to import. It is a huge PO log. Anyways, I will give this a try and hope for the best. Thank you for following up and giving me some help.

Take it easy,

Rex


0

Response Number 4
Name: rex_p
Date: August 24, 2005 at 08:40:00 Pacific
Reply:

Tom, I just found out that I do not know anything about the VBA editor. I opened it up to paste the information, but I didn't see anywhere to paste. What am I missing?


0

Response Number 5
Name: A Certain TH
Date: August 24, 2005 at 14:12:31 Pacific
Reply:

Choose "Insert Module" and you should get a blank "notepad" style sheet. Paste there. Next, click somewhere in the middle of the pasted text, then hit F5.

It will convert comments to contents for every cell that you have selected on the active sheet of the active book. So you can run it (with F5) as many times as you like. JUST BE CAREFUL NOT TO SELECT THE ORIGINAL CELLS (the ones with data AND comments) WHEN YOU RUN THIS MACRO. If you do this, you will re-write the comments back over the data!
Hope that helps a bit more

Tom


0

Related Posts

See More



Response Number 6
Name: rex_p
Date: September 1, 2005 at 08:15:41 Pacific
Reply:

Tom, thanks for the help. I wasn't able to use the editor, because the workbook was shared. As soon as I took the share off, I was able to use the editor and run your Macro. It worked good!

Take it easy,

Rex


0

Response Number 7
Name: A Certain TH
Date: September 5, 2005 at 14:59:38 Pacific
Reply:

Very glad to hear it - thanks for posting back

Tom


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Importing problems

PST import problem in Outlook 2000 www.computing.net/answers/office/pst-import-problem-in-outlook-2000/1807.html

Problem importing .PST into Outlook www.computing.net/answers/office/problem-importing-pst-into-outlook/2999.html

Importing .pst problems www.computing.net/answers/office/importing-pst-problems/3217.html