I have a client who is importing records from an Excel spreadsheet to
Access.
The import is being done from a sheet (named "Import") that has pointers
to another sheet (named "List").
Here are details of the first two rows of the sheet named Import. Rows 3
and following are copies of row 2.
--------------------------------
Column A
DrumSeal
=IF(List!K13>0,List!K13," ")
Column B
Prd_Drum
=IF(List!B13>0,List!B13," ")
Column C
MG_Drum
=IF(List!C13>0,List!C13," ")
Column D
VendorNum
=IF(List!T13>0,List!T13," ")
Column E
ItemNum
=IF(List!E13>0,VLOOKUP(List!E13,List!$W$13:$AE$48,8,FALSE)," ")
Column F
NetWeight
=IF(List!J13>0,List!J13," ")
Column G
DateRecv
=IF(List!U13>0,List!U13," ")
--------------------------------
Here are the step used in the import process:
External Data / Excel
Specify the source of the data - File name: ...\filename.xls
(*) Append a copy of the records to the table: tblSyrup
[OK]
Import Spreadsheet Wizard
(*) Show Worksheets {highlight Import}
[Next >]
Microsoft Access can use your column headings as field names...
[Next >]
Import to Table: tblSyrup
[Finish]
Save Import Steps (no)
[Close]
--------------------------------
This process generates two error tables:
Import$_ImportErrors - generated for rows where the data pointed to is
blank - understand this; not a problem
List$_Import Errors - don't know why this is getting generated
It contains one record (consistently exactly this)
Error: Type Conversion Failure
Field: F25
Row: 12
--------------------------------
I've figured out a work-around, but have NO idea why it works.
You'll notice that the data imported begins on row 13, as does the data
in the VLOOKUP used in column E of the Import sheet.
There is NO field named "F25" involved anywhere.
I tried making changes to column heading names in row 12, and found that
if I made a minor change to one of the column headings in the VLOOKUP
area, NO error gets generated on importing for sheet List.
The headings before change:
--------------------------------
W12: Item #
X12: Drums
Y12: Cost
Z12: Net lbs
AA12: Grade
AB12: (blank)
AC12: Price by Grade
AD12: Item #
AE12: Item Desc
--------------------------------
I changed the text in Y12 to Cost_ (i.e., only adding an underscore at
the end of the field name) - and NO error.
Can anyone tell me (1) why the error gets generated, and (2) why my
change in text eliminates the error?
Thanks in advance for any help solving this mystery.
Sigurd Andersen
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar