Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Problem importing from Excel to memo field in Access

Posted on 2013-12-18
6
Medium Priority
?
626 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 1400 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 46

Expert Comment

by:aikimark
ID: 39729061
double check your import specification
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

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 46

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

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

649 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