Solved

Problem importing from Excel to memo field in Access

Posted on 2013-12-18
6
557 Views
Last Modified: 2013-12-19
I am trying to import an Excel spreadsheet into Access.  There are > 255 characters in a few of the Excel cells - and so I have set up the Access field as Memo.

However, when I use the following VB code to import the spreadsheet, the data is getting truncated.  What am I missing?

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "tbl_MASTER_temp", GetFile2, True

Thanks for your help,
je
0
Comment
Question by:aeolianje
  • 3
  • 2
6 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 350 total points
ID: 39728819
Try a couple of things:

- Check your table's design.  Do you have any formatting on your memo field in your table's design?  If so, remove it.

- Also try placing a row of 'junk' data at the top of your spreadsheet with more than 255 characters in the memo field (so that the first row in that column contains more than 255 characters).
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39728860
... and try importing the data into a table that does not exist in your database, so that the table structure is created by the import itself:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "Newtbl_MASTER_temp", GetFile2, True
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39729061
double check your import specification
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Closing Comment

by:aeolianje
ID: 39729158
Perfect!   The original import was setting the format of the fields to "@".  Once I removed that, it worked!

Thank you!
je
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39729261
@aeolianje

Your closing comment suggests that the problem existed in the import specification.  However, the accepted solution comment does not seem to refer to the import specification.  Did you mean to accept that comment?
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39729450
aeolianje,

Glad to help.



akimark,

The TransferSpreadsheet method does not use import/export specifications:
http://msdn.microsoft.com/en-us/library/office/bb214134(v=office.12).aspx
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now