Solved

Problem importing from Excel to memo field in Access

Posted on 2013-12-18
6
590 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

840 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