dbTalk Databases Forums  

A2K Importing Excel into Access not always consistent - why?

comp.databases.ms-access comp.databases.ms-access


Discuss A2K Importing Excel into Access not always consistent - why? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
buckskin
 
Posts: n/a

Default A2K Importing Excel into Access not always consistent - why? - 01-31-2011 , 06:37 AM






I'm importing various Excel spreadsheets and sometimes the data being
imported is different.

By different I mean rows can be in the wrong order or, more worrying, not
all rows will be imported. If I try again it will work. For some imports
that require keying on a specific phrase in the imported file that is
precisely what I'm doing - I simply import again and it works.
Further testing reveals that incorrect imports can happen seemingly randomly
even after they initally appear to work.

I'm using this code;

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "tmpNew",
VFileName, 0


Questions;

Why is this happening?

And should I try to determine the Excel type before I run the code? I've
settled on acSpreadsheetTypeExcel8 but could this be a problem when
importing from older or newer versions of Excel. I have accounted for Excel
4 which is not accepted as an error is trapped for that.

Reply With Quote
  #2  
Old   
buckskin
 
Posts: n/a

Default Re: A2K Importing Excel into Access not always consistent - why? - 02-02-2011 , 11:09 AM






"a a r o n . k e m p f @gmail.com [MCITP: DBA]" <aaron.kempf (AT) gmail (DOT) com>
wrote in message
news:84f0250a-1bb8-4889-b22f-ecb0023a6186 (AT) o1g2000yqb (DOT) googlegroups.com...
you should get rid of excel entirely and have the data entry in Access


That would be lovely but it's unavoidable. Looks like I may be close to
solving it. Blank lines at the start can confuse Access so am deleting
those and it seems solid so far in testing. Else I may import as CSV.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.