Importing an Excel spreadsheet to Access 97 (1 Viewer)

ed1967

New member
Local time
Today, 22:01
Joined
Feb 3, 2009
Messages
6
Hi

I'm sure this is a very straightforward question, but I can't think of the answer. I am using a macro to import an Excel spreadsheet to an existing table in an Access 97 database (yes, we still use 97 in the office!). If I import the table manually, there is no problem and when I open the table, there are the expected number of rows (in this case 25724). However, if I use the macro, only 17413 rows are imported. I've tried removing the PK just in case (but as it works when I import manually, I didn't expect that to help (and it didn't). I've checked the imported data against the whole spreadsheet, and I can't see anything apparent in the rows that have failed to import. Can anyone help?

(I've reduced the macro to just that one function so I know the problem is somewhere in the TransferSpreadsheet action).

Many thanks

Ed
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 22:01
Joined
Sep 12, 2006
Messages
15,653
i would convert the macro to code, and then use code.

i suspect some rows are being skipped because there is a problem with the datatype in a particular column (text/number) and some rows therefore break a constraint.

do it manually, do it by your macro, both creating new tables and check the field types - are any different?
 

Users who are viewing this thread

Top Bottom