Import Excel spreadsheet with Lengthy entries

E

Ellen

Hello,
I have an Excel spreadsheet that has a column of lengthy
entries. When I import this spreadsheet into Access 2002,
the lengthy field gets messed up.

Thanks in advance for your help.

Ellen
 
K

Ken Snell [MVP]

You don't explain what "messed up" means, but I'll guess that you see
truncated data from that column.

Use a macro or VBA code to run the TransferSpreadsheet action to do the
import. It handles long (memo-length) text strings.
 
E

Ellen

Thanks for your speedy reply, Ken. After the import, the
field contains primarily "0"s.

Can you give me any details on running the
TransferSpreadsheet action?

Ellen
 
G

Guest

Hello Ken,
I've written the following:
Option Compare Database
DoCmd.TransferSpreadsheet acImport, 3, _
"Employees", "C:\UnifiedTables\SCOGStest4.xls",
True, "A1:B1"
in a module. Can you tell me how to run it?
Thanks,
Ellen
 
K

Ken Snell [MVP]

If you just want to do it once, use a macro instead of a module with VBA
code. It'll be easier.

In database window, click on Macros at left. Create new macro. Select
TransferSpreadsheet action and then fill in the arguments as you have noted.
Then click the Run icon (exclamation point) at top.
 
Top